Skip to content

Commit 690228f

Browse files
committed
Add psalm GitHub action
1 parent e352431 commit 690228f

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/php.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: PHP Composer
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Install dependencies
16+
run: composer install --prefer-dist --no-progress
17+
18+
- name: Cache Composer dependencies
19+
id: composer-cache
20+
uses: actions/cache@v2
21+
with:
22+
path: vendor
23+
key: ${{ runner.os }}-php-${{ github.sha }}
24+
25+
psalm:
26+
runs-on: ubuntu-latest
27+
needs:
28+
- build
29+
steps:
30+
- uses: actions/checkout@v2
31+
- name: Restore cached composer dependencies
32+
id: composer-cache
33+
uses: actions/cache@v2
34+
with:
35+
path: vendor
36+
key: ${{ runner.os }}-php-${{ github.sha }}
37+
38+
- name: Run psalm validation
39+
run: vendor/bin/psalm --output-format=github --shepherd

0 commit comments

Comments
 (0)