@@ -18,44 +18,102 @@ jobs:
1818 runs-on : ubuntu-latest
1919 steps :
2020 - uses : actions/checkout@v4
21+ - uses : pnpm/action-setup@v4
2122 - name : Set node
2223 uses : actions/setup-node@v4
2324 with :
24- node-version : lts/*
25-
26- - name : Setup
27- run : npm i -g @antfu/ni
28-
25+ node-version-file : .nvmrc
26+ cache : pnpm
27+ cache-dependency-path : pnpm-lock.yaml
2928 - name : Install
30- run : nci
31-
29+ run : pnpm install --frozen-lockfile
3230 - name : Lint
33- run : nr lint
31+ run : pnpm run lint
3432
3533 test :
3634 runs-on : ${{ matrix.os }}
37-
3835 strategy :
36+ fail-fast : false
3937 matrix :
40- node : [lts/*]
4138 os : [ubuntu-latest, windows-latest, macos-latest]
42- fail-fast : false
43-
4439 steps :
4540 - uses : actions/checkout@v4
46- - name : Set node ${{ matrix.node }}
41+ - uses : pnpm/action-setup@v4
42+ - name : Set node
4743 uses : actions/setup-node@v4
4844 with :
49- node-version : ${{ matrix.node }}
50-
51- - name : Setup
52- run : npm i -g @antfu/ni
53-
45+ node-version-file : .nvmrc
46+ cache : pnpm
47+ cache-dependency-path : pnpm-lock.yaml
5448 - name : Install
55- run : nci
56-
49+ run : pnpm install --frozen-lockfile
5750 - name : Build
58- run : nr build
59-
51+ run : pnpm build
6052 - name : Test
61- run : nr test
53+ run : pnpm test
54+
55+ php :
56+ name : PHP ${{ matrix.php-version }} + Symfony ${{ matrix.symfony-version }}${{ matrix.dependency-version == 'lowest' && ' lowest' || '' }} on ${{ matrix.os || 'ubuntu-latest' }}
57+ runs-on : ${{ matrix.os || 'ubuntu-latest' }}
58+ strategy :
59+ fail-fast : false
60+ matrix :
61+ include :
62+ # Symfony 7.4 LTS on the lowest supported PHP, resolving the lowest allowed dependencies.
63+ - php-version : ' 8.4'
64+ symfony-version : 7.4.*
65+ dependency-version : lowest
66+ - php-version : ' 8.4'
67+ symfony-version : 8.0.*
68+ - php-version : ' 8.5'
69+ symfony-version : 7.4.*
70+ - php-version : ' 8.5'
71+ symfony-version : 8.0.*
72+
73+ # Windows
74+ - php-version : ' 8.4'
75+ symfony-version : 7.4.*
76+ os : windows-latest
77+ - php-version : ' 8.5'
78+ symfony-version : 8.1.*
79+ os : windows-latest
80+ env :
81+ # symfony/flex (installed as a global tool below) reads SYMFONY_REQUIRE and forces every
82+ # symfony/* package to this version during the Composer resolution.
83+ SYMFONY_REQUIRE : ${{ matrix.symfony-version }}
84+ steps :
85+ - uses : actions/checkout@v4
86+ - name : Setup PHP
87+ uses : shivammathur/setup-php@v2
88+ with :
89+ php-version : ${{ matrix.php-version }}
90+ tools : flex
91+ - name : Install dependencies
92+ uses : ramsey/composer-install@v3
93+ with :
94+ dependency-versions : ${{ matrix.dependency-version == 'lowest' && 'lowest' || 'highest' }}
95+ composer-options : --prefer-dist
96+ custom-cache-suffix : ${{ matrix.symfony-version }}
97+ - name : PHPUnit
98+ run : vendor/bin/phpunit
99+
100+ php-qa :
101+ runs-on : ubuntu-latest
102+ steps :
103+ - uses : actions/checkout@v4
104+ - name : Setup PHP
105+ uses : shivammathur/setup-php@v2
106+ with :
107+ php-version : ' 8.4'
108+ tools : composer:v2
109+ - name : Validate composer.json
110+ run : composer validate --strict
111+ - name : Install dependencies
112+ uses : ramsey/composer-install@v3
113+ with :
114+ dependency-versions : highest
115+ composer-options : --prefer-dist
116+ - name : PHPStan
117+ run : vendor/bin/phpstan analyse
118+ - name : PHP-CS-Fixer
119+ run : vendor/bin/php-cs-fixer fix --dry-run --diff
0 commit comments