|
1 | 1 | name: CI |
2 | 2 |
|
3 | 3 | on: |
4 | | - push: |
5 | | - branches: |
6 | | - - main |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
7 | 7 |
|
8 | | - pull_request: |
9 | | - branches: |
10 | | - - main |
| 8 | + pull_request: |
| 9 | + branches: |
| 10 | + - main |
11 | 11 |
|
12 | 12 | # Cancel any in-progress run for the same ref (branch/PR) when a new commit is pushed. |
13 | 13 | concurrency: |
14 | | - group: ${{ github.workflow }}-${{ github.ref }} |
15 | | - cancel-in-progress: true |
| 14 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 15 | + cancel-in-progress: true |
16 | 16 |
|
17 | 17 | permissions: {} |
18 | 18 |
|
19 | 19 | jobs: |
20 | | - lint: |
21 | | - runs-on: ubuntu-latest |
22 | | - permissions: |
23 | | - contents: read |
24 | | - steps: |
25 | | - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
26 | | - with: |
27 | | - persist-credentials: false |
28 | | - - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 |
29 | | - - name: Set node |
30 | | - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 |
31 | | - with: |
32 | | - node-version-file: .nvmrc |
33 | | - cache: pnpm |
34 | | - cache-dependency-path: pnpm-lock.yaml |
35 | | - - name: Install |
36 | | - run: pnpm install --frozen-lockfile |
37 | | - - name: Lint |
38 | | - run: pnpm run lint |
| 20 | + lint: |
| 21 | + runs-on: ubuntu-latest |
| 22 | + permissions: |
| 23 | + contents: read |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| 26 | + with: |
| 27 | + persist-credentials: false |
| 28 | + - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 |
| 29 | + - name: Set node |
| 30 | + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 |
| 31 | + with: |
| 32 | + node-version-file: .nvmrc |
| 33 | + cache: pnpm |
| 34 | + cache-dependency-path: pnpm-lock.yaml |
| 35 | + - name: Install |
| 36 | + run: pnpm install --frozen-lockfile |
| 37 | + - name: Lint |
| 38 | + run: pnpm run lint |
| 39 | + - name: Format check |
| 40 | + run: pnpm run fmt:check |
39 | 41 |
|
40 | | - test: |
41 | | - runs-on: ${{ matrix.os }} |
42 | | - permissions: |
43 | | - contents: read |
44 | | - strategy: |
45 | | - fail-fast: false |
46 | | - matrix: |
47 | | - os: [ubuntu-latest, windows-latest, macos-latest] |
48 | | - steps: |
49 | | - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
50 | | - with: |
51 | | - persist-credentials: false |
52 | | - - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 |
53 | | - - name: Set node |
54 | | - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 |
55 | | - with: |
56 | | - node-version-file: .nvmrc |
57 | | - cache: pnpm |
58 | | - cache-dependency-path: pnpm-lock.yaml |
59 | | - - name: Install |
60 | | - run: pnpm install --frozen-lockfile |
61 | | - - name: Build |
62 | | - run: pnpm build |
63 | | - - name: Test |
64 | | - run: pnpm test |
| 42 | + test: |
| 43 | + runs-on: ${{ matrix.os }} |
| 44 | + permissions: |
| 45 | + contents: read |
| 46 | + strategy: |
| 47 | + fail-fast: false |
| 48 | + matrix: |
| 49 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 50 | + steps: |
| 51 | + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| 52 | + with: |
| 53 | + persist-credentials: false |
| 54 | + - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 |
| 55 | + - name: Set node |
| 56 | + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 |
| 57 | + with: |
| 58 | + node-version-file: .nvmrc |
| 59 | + cache: pnpm |
| 60 | + cache-dependency-path: pnpm-lock.yaml |
| 61 | + - name: Install |
| 62 | + run: pnpm install --frozen-lockfile |
| 63 | + - name: Build |
| 64 | + run: pnpm build |
| 65 | + - name: Test |
| 66 | + run: pnpm test |
65 | 67 |
|
66 | | - php: |
67 | | - name: PHP ${{ matrix.php-version }} + Symfony ${{ matrix.symfony-version }}${{ matrix.dependency-version == 'lowest' && ' lowest' || '' }} on ${{ matrix.os || 'ubuntu-latest' }} |
68 | | - runs-on: ${{ matrix.os || 'ubuntu-latest' }} |
69 | | - permissions: |
70 | | - contents: read |
71 | | - strategy: |
72 | | - fail-fast: false |
73 | | - matrix: |
74 | | - include: |
75 | | - # Symfony 7.4 LTS on the lowest supported PHP, resolving the lowest allowed dependencies. |
76 | | - - php-version: '8.4' |
77 | | - symfony-version: 7.4.* |
78 | | - dependency-version: lowest |
79 | | - - php-version: '8.4' |
80 | | - symfony-version: 8.0.* |
81 | | - - php-version: '8.5' |
82 | | - symfony-version: 7.4.* |
83 | | - - php-version: '8.5' |
84 | | - symfony-version: 8.0.* |
| 68 | + php: |
| 69 | + name: PHP ${{ matrix.php-version }} + Symfony ${{ matrix.symfony-version }}${{ matrix.dependency-version == 'lowest' && ' lowest' || '' }} on ${{ matrix.os || 'ubuntu-latest' }} |
| 70 | + runs-on: ${{ matrix.os || 'ubuntu-latest' }} |
| 71 | + permissions: |
| 72 | + contents: read |
| 73 | + strategy: |
| 74 | + fail-fast: false |
| 75 | + matrix: |
| 76 | + include: |
| 77 | + # Symfony 7.4 LTS on the lowest supported PHP, resolving the lowest allowed dependencies. |
| 78 | + - php-version: '8.4' |
| 79 | + symfony-version: 7.4.* |
| 80 | + dependency-version: lowest |
| 81 | + - php-version: '8.4' |
| 82 | + symfony-version: 8.0.* |
| 83 | + - php-version: '8.5' |
| 84 | + symfony-version: 7.4.* |
| 85 | + - php-version: '8.5' |
| 86 | + symfony-version: 8.0.* |
85 | 87 |
|
86 | | - # Windows |
87 | | - - php-version: '8.4' |
88 | | - symfony-version: 7.4.* |
89 | | - os: windows-latest |
90 | | - - php-version: '8.5' |
91 | | - symfony-version: 8.1.* |
92 | | - os: windows-latest |
93 | | - env: |
94 | | - # symfony/flex (installed as a global tool below) reads SYMFONY_REQUIRE and forces every |
95 | | - # symfony/* package to this version during the Composer resolution. |
96 | | - SYMFONY_REQUIRE: ${{ matrix.symfony-version }} |
97 | | - steps: |
98 | | - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
99 | | - with: |
100 | | - persist-credentials: false |
101 | | - - name: Setup PHP |
102 | | - uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 |
103 | | - with: |
104 | | - php-version: ${{ matrix.php-version }} |
105 | | - tools: flex |
106 | | - - name: Install dependencies |
107 | | - uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 |
108 | | - with: |
109 | | - dependency-versions: ${{ matrix.dependency-version == 'lowest' && 'lowest' || 'highest' }} |
110 | | - composer-options: --prefer-dist |
111 | | - custom-cache-suffix: ${{ matrix.symfony-version }} |
112 | | - - name: PHPUnit |
113 | | - run: vendor/bin/phpunit |
| 88 | + # Windows |
| 89 | + - php-version: '8.4' |
| 90 | + symfony-version: 7.4.* |
| 91 | + os: windows-latest |
| 92 | + - php-version: '8.5' |
| 93 | + symfony-version: 8.1.* |
| 94 | + os: windows-latest |
| 95 | + env: |
| 96 | + # symfony/flex (installed as a global tool below) reads SYMFONY_REQUIRE and forces every |
| 97 | + # symfony/* package to this version during the Composer resolution. |
| 98 | + SYMFONY_REQUIRE: ${{ matrix.symfony-version }} |
| 99 | + steps: |
| 100 | + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| 101 | + with: |
| 102 | + persist-credentials: false |
| 103 | + - name: Setup PHP |
| 104 | + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 |
| 105 | + with: |
| 106 | + php-version: ${{ matrix.php-version }} |
| 107 | + tools: flex |
| 108 | + - name: Install dependencies |
| 109 | + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 |
| 110 | + with: |
| 111 | + dependency-versions: ${{ matrix.dependency-version == 'lowest' && 'lowest' || 'highest' }} |
| 112 | + composer-options: --prefer-dist |
| 113 | + custom-cache-suffix: ${{ matrix.symfony-version }} |
| 114 | + - name: PHPUnit |
| 115 | + run: vendor/bin/phpunit |
114 | 116 |
|
115 | | - php-qa: |
116 | | - runs-on: ubuntu-latest |
117 | | - permissions: |
118 | | - contents: read |
119 | | - steps: |
120 | | - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
121 | | - with: |
122 | | - persist-credentials: false |
123 | | - - name: Setup PHP |
124 | | - uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 |
125 | | - with: |
126 | | - php-version: '8.4' |
127 | | - tools: composer:v2 |
128 | | - - name: Validate composer.json |
129 | | - run: composer validate --strict |
130 | | - - name: Install dependencies |
131 | | - uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 |
132 | | - with: |
133 | | - dependency-versions: highest |
134 | | - composer-options: --prefer-dist |
135 | | - - name: PHPStan |
136 | | - run: vendor/bin/phpstan analyse |
137 | | - - name: PHP-CS-Fixer |
138 | | - run: vendor/bin/php-cs-fixer fix --dry-run --diff |
| 117 | + php-qa: |
| 118 | + runs-on: ubuntu-latest |
| 119 | + permissions: |
| 120 | + contents: read |
| 121 | + steps: |
| 122 | + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| 123 | + with: |
| 124 | + persist-credentials: false |
| 125 | + - name: Setup PHP |
| 126 | + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 |
| 127 | + with: |
| 128 | + php-version: '8.4' |
| 129 | + tools: composer:v2 |
| 130 | + - name: Validate composer.json |
| 131 | + run: composer validate --strict |
| 132 | + - name: Install dependencies |
| 133 | + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 |
| 134 | + with: |
| 135 | + dependency-versions: highest |
| 136 | + composer-options: --prefer-dist |
| 137 | + - name: PHPStan |
| 138 | + run: vendor/bin/phpstan analyse |
| 139 | + - name: PHP-CS-Fixer |
| 140 | + run: vendor/bin/php-cs-fixer fix --dry-run --diff |
0 commit comments