77 COMPOSER_PREFER_STABLE : ' 1'
88 TEST_OUTPUT_STYLE : pretty
99
10+ permissions :
11+ contents : read
12+
1013jobs :
1114 fetch-supported-versions :
1215 name : Fetch supported versions
1316 runs-on : ubuntu-latest
17+ permissions :
18+ contents : read
1419 outputs :
1520 php-min : ${{ steps.fetch-php-versions.outputs.min }}
1621 php-max : ${{ steps.fetch-php-versions.outputs.max }}
@@ -20,13 +25,15 @@ jobs:
2025 id : fetch-php-versions
2126 uses : yoanm/gha-supported-versions-parser@feature/init
2227 with :
23- dependency : php
2428 path : .github/workflows/supported-versions.json
29+ dependency : php
2530
2631 tests :
2732 name : ${{ matrix.job-name }}
2833 needs : [fetch-supported-versions]
2934 runs-on : ubuntu-latest
35+ permissions :
36+ contents : read
3037 env :
3138 COVERAGE_TYPE : none
3239 COVERAGE_OUTPUT_STYLE : clover
@@ -116,6 +123,8 @@ jobs:
116123 name : Static analysis
117124 needs : [fetch-supported-versions]
118125 runs-on : ubuntu-latest
126+ permissions :
127+ contents : read
119128 env :
120129 PHP_VERSION : ${{ needs.fetch-supported-versions.outputs.php-max }}
121130 steps :
@@ -153,44 +162,3 @@ jobs:
153162 - name : Dependencies check
154163 if : ${{ github.event_name == 'pull_request' }}
155164 uses : actions/dependency-review-action@v4
156-
157- nightly-tests :
158- name : Nightly
159- needs : [ fetch-supported-versions, tests ]
160- runs-on : ubuntu-latest
161- continue-on-error : true
162- env :
163- PHP_VERSION : ${{ needs.fetch-supported-versions.outputs.php-next }}
164- COMPOSER_IGNORE_PLATFORM_REQ : ' php+'
165- steps :
166- - name : Check out code
167- uses : actions/checkout@v5
168-
169- - name : Setup PHP ${{ env.PHP_VERSION }}
170- id : setup-php
171- uses : shivammathur/setup-php@v2
172- env :
173- update : true # whether to use latest available patch for the version or not
174- fail-fast : true # step will fail if an extension or tool fails to set up
175- with :
176- php-version : ${{ env.PHP_VERSION }}
177- tools : composer
178- coverage : none
179-
180- - name : Get composer cache directory
181- id : composer-cache
182- run : echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
183-
184- - name : Setup cache for PHP ${{ steps.setup-php.outputs.php-version }}
185- uses : actions/cache@v4
186- with :
187- path : |
188- ${{ steps.composer-cache.outputs.dir }}
189- # Clear the cache if composer.json (as composer.lock is not available) has been updated
190- key : tests-php${{ steps.setup-php.outputs.php-version }}-${{ hashFiles('composer.json') }}
191-
192- - name : Build with PHP ${{ steps.setup-php.outputs.php-version }}
193- run : make build
194-
195- - name : Test
196- run : make test-unit && make test-functional
0 commit comments