99 - ' main'
1010 - ' hotfix-*'
1111
12+ permissions :
13+ contents : read
14+
15+ concurrency :
16+ group : ${{ github.ref }}
17+ cancel-in-progress : ${{ github.ref != 'refs/heads/main' }}
18+
1219jobs :
20+ static-checks :
21+ name : Run static checks
22+ runs-on : ubuntu-latest
23+ steps :
24+ - name : Checkout
25+ uses : actions/checkout@v6
26+
27+ - name : Set up PHP
28+ uses : shivammathur/setup-php@v2
29+ with :
30+ php-version : " 8.3"
31+
32+ - name : Validate composer.json
33+ run : composer validate
34+
35+ - name : Install dependencies
36+ run : composer update --prefer-dist --no-progress
37+
38+ - name : Run PHP_CodeSniffer
39+ run : vendor/bin/phpcs -sp
40+
41+ - name : Run Psalm
42+ run : vendor/bin/psalm --shepherd
43+
1344 tests :
14- name : PHP ${{ matrix.php-version }} on ${{ matrix.os }} ( ${{ matrix.composer-options }})
15- runs-on : ${{ matrix.os }}
45+ name : Test on ${{ matrix.os }} php ${{ matrix.php-version }}
46+ runs-on : ${{ matrix.os }}-latest
1647 strategy :
1748 fail-fast : false
1849 matrix :
@@ -22,15 +53,13 @@ jobs:
2253 - " 8.2"
2354 - " 8.3"
2455 os :
25- - ubuntu-latest
26- - windows-latest
27- - macOS-latest
28- composer-options :
29- - " "
30- - " --prefer-lowest"
56+ - ubuntu
57+ - windows
58+ - macOS
59+
3160 steps :
3261 - name : Checkout
33- uses : actions/checkout@v4
62+ uses : actions/checkout@v6
3463
3564 - name : Set up PHP ${{ matrix.php-version }}
3665 uses : shivammathur/setup-php@v2
@@ -40,14 +69,21 @@ jobs:
4069 coverage : xdebug
4170 ini-values : error_reporting=E_ALL
4271
43- - name : Validate composer.json and composer.lock
44- run : composer validate
45-
4672 - name : Install dependencies
47- run : composer update
48- --prefer-dist
49- --no-progress
50- ${{ matrix.composer-options }}
73+ run : composer update --prefer-dist --no-progress
74+
75+ - name : Show Codeception version
76+ run : |
77+ echo "Tested against Codeception **v$(
78+ composer show codeception/codeception --format json | jq -r '.versions[0]'
79+ )**" >> "$GITHUB_STEP_SUMMARY"
80+ shell : bash
81+
82+ - name : Run unit tests tests
83+ run : composer test-unit
84+
85+ - name : Run samples
86+ run : composer test-report-generate
5187
52- - name : Run tests
53- run : composer test
88+ - name : Assert samples
89+ run : composer test-report-check
0 commit comments