|
1 | 1 |
|
2 | 2 | name: "Continuous Integration" |
3 | 3 |
|
4 | | -on: ["pull_request", "push"] |
| 4 | +on: |
| 5 | + pull_request: |
| 6 | + branches: |
| 7 | + - "*.x" |
| 8 | + - "master" |
| 9 | + push: |
| 10 | + branches: |
| 11 | + - "*.x" |
| 12 | + - "master" |
5 | 13 |
|
6 | 14 | jobs: |
7 | | - static-analysis-phpstan: |
8 | | - name: "Static Analysis with PHPStan" |
9 | | - runs-on: "ubuntu-20.04" |
10 | | - |
11 | | - strategy: |
12 | | - matrix: |
13 | | - php-version: |
14 | | - - "7.4" |
15 | | - |
16 | | - steps: |
17 | | - - name: "Checkout code" |
18 | | - uses: "actions/checkout@v2" |
19 | | - |
20 | | - - name: "Install PHP" |
21 | | - uses: "shivammathur/setup-php@v2" |
22 | | - with: |
23 | | - coverage: "none" |
24 | | - php-version: "${{ matrix.php-version }}" |
25 | | - tools: "cs2pr" |
26 | | - |
27 | | - - name: "Cache dependencies installed with composer" |
28 | | - uses: "actions/cache@v2" |
29 | | - with: |
30 | | - path: "~/.composer/cache" |
31 | | - key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" |
32 | | - restore-keys: "php-${{ matrix.php-version }}-composer-locked-" |
33 | | - |
34 | | - - name: "Install dependencies with composer" |
35 | | - run: "composer install --no-interaction --no-progress --no-suggest" |
36 | | - |
37 | | - - name: "Run a static analysis with phpstan/phpstan" |
38 | | - run: "vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr" |
39 | | - |
40 | | - static-analysis-psalm: |
41 | | - name: "Static Analysis with Psalm" |
42 | | - runs-on: "ubuntu-20.04" |
43 | | - |
44 | | - strategy: |
45 | | - matrix: |
46 | | - php-version: |
47 | | - - "7.4" |
48 | | - |
49 | | - steps: |
50 | | - - name: "Checkout code" |
51 | | - uses: "actions/checkout@v2" |
52 | | - |
53 | | - - name: "Install PHP" |
54 | | - uses: "shivammathur/setup-php@v2" |
55 | | - with: |
56 | | - coverage: "none" |
57 | | - php-version: "${{ matrix.php-version }}" |
58 | | - |
59 | | - - name: "Cache dependencies installed with composer" |
60 | | - uses: "actions/cache@v2" |
61 | | - with: |
62 | | - path: "~/.composer/cache" |
63 | | - key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" |
64 | | - restore-keys: "php-${{ matrix.php-version }}-composer-locked-" |
65 | | - |
66 | | - - name: "Install dependencies with composer" |
67 | | - run: "composer install --no-interaction --no-progress --no-suggest" |
68 | | - |
69 | | - - name: "Run a static analysis with vimeo/psalm" |
70 | | - run: "vendor/bin/psalm --show-info=false --stats --output-format=github --threads=4" |
71 | | - |
72 | 15 | phpunit-oci8: |
73 | 16 | name: "PHPUnit on OCI8" |
74 | 17 | runs-on: "ubuntu-20.04" |
|
142 | 85 | coverage: "pcov" |
143 | 86 |
|
144 | 87 | - name: "Cache dependencies installed with composer" |
145 | | - uses: "actions/cache@v1" |
| 88 | + uses: "actions/cache@v2" |
146 | 89 | with: |
147 | 90 | path: "~/.composer/cache" |
148 | 91 | key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" |
|
0 commit comments