|
1 | | -on: [push, pull_request] |
| 1 | +on: [pull_request] |
2 | 2 | name: Static analysis |
3 | 3 |
|
4 | 4 | jobs: |
5 | 5 | phpstan: |
6 | 6 | name: PHPStan |
7 | | - runs-on: ubuntu-latest |
| 7 | + runs-on: ubuntu-20.04 |
| 8 | + |
8 | 9 | steps: |
9 | 10 | - name: Checkout code |
10 | 11 | uses: actions/checkout@v2 |
11 | 12 |
|
12 | | - - name: PHPStan |
13 | | - uses: docker://oskarstark/phpstan-ga |
14 | | - env: |
15 | | - REQUIRE_DEV: true |
| 13 | + - name: Setup PHP |
| 14 | + uses: shivammathur/setup-php@v2 |
16 | 15 | with: |
17 | | - args: analyze --no-progress |
| 16 | + php-version: 8.0 |
| 17 | + coverage: none |
| 18 | + tools: phpstan:0.12.92, cs2pr |
| 19 | + |
| 20 | + - name: Download dependencies |
| 21 | + uses: ramsey/composer-install@v1 |
| 22 | + |
| 23 | + - name: PHPStan |
| 24 | + run: phpstan analyze --no-progress --error-format=checkstyle | cs2pr |
18 | 25 |
|
19 | 26 | php-cs-fixer: |
20 | 27 | name: PHP-CS-Fixer |
21 | | - runs-on: ubuntu-latest |
| 28 | + runs-on: ubuntu-20.04 |
| 29 | + |
22 | 30 | steps: |
23 | | - - uses: actions/checkout@v2 |
24 | | - - name: PHP-CS-Fixer |
25 | | - uses: docker://oskarstark/php-cs-fixer-ga |
| 31 | + - name: Checkout code |
| 32 | + uses: actions/checkout@v2 |
| 33 | + |
| 34 | + - name: Setup PHP |
| 35 | + uses: shivammathur/setup-php@v2 |
26 | 36 | with: |
27 | | - args: --dry-run --diff-format udiff |
| 37 | + php-version: 8.0 |
| 38 | + coverage: none |
| 39 | + tools: php-cs-fixer:2.19.0, cs2pr |
| 40 | + |
| 41 | + - name: PHP-CS-Fixer |
| 42 | + run: php-cs-fixer fix --dry-run --format=checkstyle | cs2pr |
28 | 43 |
|
29 | 44 | psalm: |
30 | 45 | name: Psalm |
31 | | - runs-on: ubuntu-latest |
| 46 | + runs-on: ubuntu-20.04 |
32 | 47 | steps: |
33 | 48 | - name: Checkout code |
34 | 49 | uses: actions/checkout@v2 |
35 | 50 |
|
| 51 | + - name: Setup PHP |
| 52 | + uses: shivammathur/setup-php@v2 |
| 53 | + with: |
| 54 | + php-version: 8.0 |
| 55 | + coverage: none |
| 56 | + tools: vimeo/psalm:4.8.1 |
| 57 | + |
| 58 | + - name: Download dependencies |
| 59 | + uses: ramsey/composer-install@v1 |
| 60 | + |
36 | 61 | - name: Psalm |
37 | | - uses: docker://vimeo/psalm-github-actions |
| 62 | + run: psalm --no-progress --output-format=github |
| 63 | + |
| 64 | + composer-normalize: |
| 65 | + name: Composer Normalize |
| 66 | + runs-on: ubuntu-20.04 |
| 67 | + |
| 68 | + steps: |
| 69 | + - name: Setup PHP |
| 70 | + uses: shivammathur/setup-php@v2 |
| 71 | + with: |
| 72 | + php-version: 8.0 |
| 73 | + coverage: none |
| 74 | + tools: composer-normalize |
| 75 | + |
| 76 | + - name: Checkout code |
| 77 | + uses: actions/checkout@v2 |
| 78 | + |
| 79 | + - name: Normalize |
| 80 | + run: composer-normalize --dry-run |
0 commit comments