|
7 | 7 | - "master" |
8 | 8 | - "renovate/*" |
9 | 9 |
|
| 10 | +env: |
| 11 | + INI_VALUES: zend.assertions=1,error_reporting=-1,date.timezone="Europe/Rome" |
| 12 | + |
10 | 13 | jobs: |
11 | 14 | composer-json-lint: |
12 | 15 | name: "Lint composer.json" |
13 | | - |
14 | 16 | runs-on: "ubuntu-latest" |
15 | | - |
16 | 17 | strategy: |
17 | 18 | matrix: |
18 | 19 | php-version: |
19 | | - - "8.2" |
| 20 | + - "8.3" |
20 | 21 |
|
21 | 22 | steps: |
22 | | - - name: "Checkout" |
23 | | - uses: "actions/checkout@v4" |
24 | | - |
25 | | - - name: "Install PHP" |
26 | | - uses: "shivammathur/setup-php@v2" |
| 23 | + - uses: "actions/checkout@v4" |
| 24 | + - uses: "shivammathur/setup-php@v2" |
27 | 25 | with: |
28 | 26 | coverage: "none" |
29 | 27 | php-version: "${{ matrix.php-version }}" |
| 28 | + ini-values: "${{ env.INI_VALUES }}" |
30 | 29 | tools: composer-normalize |
31 | 30 |
|
32 | | - - name: "Validate composer.json" |
33 | | - run: "composer validate --strict" |
34 | | - |
35 | | - - name: "Normalize composer.json" |
36 | | - run: "composer-normalize --dry-run" |
| 31 | + - run: "composer validate --strict" |
| 32 | + - run: "composer-normalize --dry-run" |
37 | 33 |
|
38 | 34 | tests: |
39 | 35 | name: "Tests" |
40 | | - |
41 | 36 | runs-on: "ubuntu-latest" |
42 | | - |
43 | 37 | strategy: |
44 | 38 | matrix: |
45 | 39 | php-version: |
46 | | - - "8.2" |
47 | 40 | - "8.3" |
48 | 41 | - "8.4" |
49 | | - dependencies: |
50 | | - - "highest" |
51 | 42 |
|
52 | 43 | steps: |
53 | | - - name: "Checkout" |
54 | | - uses: "actions/checkout@v4" |
55 | | - |
56 | | - - name: "Install PHP" |
57 | | - uses: "shivammathur/setup-php@v2" |
| 44 | + - uses: "actions/checkout@v4" |
| 45 | + - uses: "shivammathur/setup-php@v2" |
58 | 46 | with: |
59 | | - coverage: "none" |
| 47 | + coverage: "pcov" |
60 | 48 | php-version: "${{ matrix.php-version }}" |
61 | | - ini-values: zend.assertions=1 |
62 | | - |
63 | | - - name: "Get composer cache directory" |
64 | | - id: composercache |
65 | | - run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
66 | | - |
67 | | - - name: "Cache dependencies" |
68 | | - uses: actions/cache@v4 |
69 | | - with: |
70 | | - path: ${{ steps.composercache.outputs.dir }} |
71 | | - key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-${{ hashFiles('**/composer.json') }} |
72 | | - restore-keys: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer- |
73 | | - |
74 | | - - name: "Remove PHP-CS-Fixer not ready for PHP 8.3 yet" |
75 | | - run: "composer remove --dev --no-update slam/php-cs-fixer-extensions" |
76 | | - |
77 | | - - name: "Install lowest dependencies" |
78 | | - if: ${{ matrix.dependencies == 'lowest' }} |
79 | | - run: "composer update --no-interaction --no-progress --prefer-lowest" |
80 | | - |
81 | | - - name: "Install highest dependencies" |
82 | | - if: ${{ matrix.dependencies == 'highest' }} |
83 | | - run: "composer update --no-interaction --no-progress" |
| 49 | + ini-values: "${{ env.INI_VALUES }}" |
| 50 | + - uses: "ramsey/composer-install@v3" |
84 | 51 |
|
85 | 52 | - name: "Run tests" |
86 | 53 | timeout-minutes: 5 |
87 | 54 | run: "vendor/bin/phpunit --no-coverage --no-logging" |
88 | 55 |
|
89 | 56 | code-coverage: |
90 | 57 | name: "Code Coverage" |
91 | | - |
92 | 58 | runs-on: "ubuntu-latest" |
93 | | - |
94 | 59 | strategy: |
95 | 60 | matrix: |
96 | 61 | php-version: |
97 | | - - "8.2" |
| 62 | + - "8.3" |
98 | 63 |
|
99 | 64 | steps: |
100 | | - - name: "Checkout" |
101 | | - uses: "actions/checkout@v4" |
102 | | - |
103 | | - - name: "Install PHP" |
104 | | - uses: "shivammathur/setup-php@v2" |
| 65 | + - uses: "actions/checkout@v4" |
| 66 | + - uses: "shivammathur/setup-php@v2" |
105 | 67 | with: |
106 | 68 | coverage: "pcov" |
107 | 69 | php-version: "${{ matrix.php-version }}" |
108 | | - ini-values: zend.assertions=1 |
109 | | - |
110 | | - - name: "Get composer cache directory" |
111 | | - id: composercache |
112 | | - run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
113 | | - |
114 | | - - name: "Cache dependencies" |
115 | | - uses: actions/cache@v4 |
116 | | - with: |
117 | | - path: ${{ steps.composercache.outputs.dir }} |
118 | | - key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-${{ hashFiles('**/composer.json') }} |
119 | | - restore-keys: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer- |
120 | | - |
121 | | - - name: "Install dependencies" |
122 | | - run: "composer update --no-interaction --no-progress" |
| 70 | + ini-values: "${{ env.INI_VALUES }}" |
| 71 | + - uses: "ramsey/composer-install@v3" |
123 | 72 |
|
124 | 73 | - name: "Run tests" |
125 | 74 | timeout-minutes: 10 |
126 | 75 | run: "vendor/bin/phpunit --coverage-clover=coverage.xml" |
127 | 76 |
|
128 | 77 | - name: "Send code coverage report to Codecov.io" |
129 | | - uses: codecov/codecov-action@v5 |
| 78 | + uses: "codecov/codecov-action@v5" |
130 | 79 | with: |
131 | 80 | token: ${{ secrets.CODECOV_TOKEN }} |
132 | 81 | file: ./coverage.xml |
133 | 82 | fail_ci_if_error: true |
134 | 83 |
|
135 | 84 | coding-standards: |
136 | 85 | name: "Coding Standards" |
137 | | - |
138 | 86 | runs-on: "ubuntu-latest" |
139 | | - |
140 | 87 | strategy: |
141 | 88 | matrix: |
142 | 89 | php-version: |
143 | | - - "8.2" |
| 90 | + - "8.3" |
144 | 91 |
|
145 | 92 | steps: |
146 | | - - name: "Checkout" |
147 | | - uses: "actions/checkout@v4" |
148 | | - |
149 | | - - name: "Install PHP" |
150 | | - uses: "shivammathur/setup-php@v2" |
| 93 | + - uses: "actions/checkout@v4" |
| 94 | + - uses: "shivammathur/setup-php@v2" |
151 | 95 | with: |
152 | 96 | coverage: "none" |
153 | 97 | php-version: "${{ matrix.php-version }}" |
154 | | - |
155 | | - - name: "Get composer cache directory" |
156 | | - id: composercache |
157 | | - run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
158 | | - |
159 | | - - name: "Cache dependencies" |
160 | | - uses: actions/cache@v4 |
161 | | - with: |
162 | | - path: ${{ steps.composercache.outputs.dir }} |
163 | | - key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-${{ hashFiles('**/composer.json') }} |
164 | | - restore-keys: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer- |
165 | | - |
166 | | - - name: "Install dependencies" |
167 | | - run: "composer update --no-interaction --no-progress" |
| 98 | + ini-values: "${{ env.INI_VALUES }}" |
| 99 | + - uses: "ramsey/composer-install@v3" |
168 | 100 |
|
169 | 101 | - name: "Check coding standards" |
170 | 102 | run: "vendor/bin/php-cs-fixer fix --verbose --dry-run --diff" |
171 | 103 |
|
172 | 104 | static-analysis: |
173 | 105 | name: "Static Analysis" |
174 | | - |
175 | 106 | runs-on: "ubuntu-latest" |
176 | | - |
177 | 107 | strategy: |
178 | 108 | matrix: |
179 | 109 | php-version: |
180 | | - - "8.2" |
| 110 | + - "8.3" |
181 | 111 |
|
182 | 112 | steps: |
183 | | - - name: "Checkout" |
184 | | - uses: "actions/checkout@v4" |
185 | | - |
186 | | - - name: "Install PHP" |
187 | | - uses: "shivammathur/setup-php@v2" |
| 113 | + - uses: "actions/checkout@v4" |
| 114 | + - uses: "shivammathur/setup-php@v2" |
188 | 115 | with: |
189 | 116 | coverage: "none" |
190 | 117 | php-version: "${{ matrix.php-version }}" |
191 | | - tools: cs2pr |
192 | | - |
193 | | - - name: "Get composer cache directory" |
194 | | - id: composercache |
195 | | - run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
196 | | - |
197 | | - - name: "Cache dependencies" |
198 | | - uses: actions/cache@v4 |
199 | | - with: |
200 | | - path: ${{ steps.composercache.outputs.dir }} |
201 | | - key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-${{ hashFiles('**/composer.json') }} |
202 | | - restore-keys: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer- |
203 | | - |
204 | | - - name: "Install dependencies" |
205 | | - run: "composer update --no-interaction --no-progress" |
| 118 | + ini-values: "${{ env.INI_VALUES }}" |
| 119 | + - uses: "ramsey/composer-install@v3" |
206 | 120 |
|
207 | 121 | - name: "Run static analysis" |
208 | | - run: "vendor/bin/phpstan analyse --no-progress --error-format=checkstyle | cs2pr" |
| 122 | + run: "vendor/bin/phpstan analyse --no-progress" |
0 commit comments