|
1 | | -name: build |
| 1 | +name: "build" |
2 | 2 | on: |
3 | | - push: ~ |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - "2.x" |
4 | 6 | pull_request: ~ |
5 | 7 | workflow_dispatch: ~ |
6 | 8 |
|
7 | 9 | jobs: |
8 | | - checks: |
9 | | - name: 'PHP ${{ matrix.php-versions }} with composer args: ${{ matrix.composer-args }}' |
10 | | - runs-on: ubuntu-latest |
| 10 | + coding-standards: |
| 11 | + name: "Coding Standards" |
| 12 | + |
| 13 | + runs-on: "ubuntu-latest" |
| 14 | + |
11 | 15 | strategy: |
12 | 16 | matrix: |
13 | | - php-versions: ['7.4', '8.0', '8.1'] |
14 | | - composer-args: ['--prefer-lowest --prefer-stable', ''] |
| 17 | + php-version: |
| 18 | + - "7.4" |
| 19 | + |
| 20 | + dependencies: |
| 21 | + - "highest" |
| 22 | + |
15 | 23 | steps: |
16 | | - - name: Checkout |
17 | | - uses: actions/checkout@v1 |
18 | | - - name: Setup PHP, with composer and extensions |
19 | | - uses: shivammathur/setup-php@v2 |
20 | | - with: |
21 | | - php-version: ${{ matrix.php-versions }} |
22 | | - extensions: intl |
23 | | - tools: composer-require-checker, composer-unused |
24 | | - coverage: none |
25 | | - - name: Install Composer dependencies |
26 | | - run: composer update --no-progress --no-suggest --prefer-dist --no-interaction ${{ matrix.composer-args }} |
27 | | - - name: Validate composer |
28 | | - run: composer validate --strict |
29 | | - - name: Check composer normalized |
30 | | - run: composer normalize --dry-run |
31 | | - - name: Check style |
32 | | - run: composer check-style |
33 | | - - name: Static analysis |
34 | | - run: composer analyse |
35 | | - - name: Run phpunit |
36 | | - run: composer phpunit |
37 | | - - name: Composer require checker |
38 | | - if: matrix.php-versions == '7.4' && matrix.composer-args == '' |
39 | | - run: composer-require-checker |
40 | | - - name: Composer unused checker |
41 | | - if: matrix.php-versions == '7.4' && matrix.composer-args == '' |
42 | | - run: composer-unused |
| 24 | + - name: "Checkout" |
| 25 | + uses: "actions/checkout@v4" |
| 26 | + |
| 27 | + - name: "Setup PHP, with composer and extensions" |
| 28 | + uses: "shivammathur/setup-php@v2" |
| 29 | + with: |
| 30 | + php-version: "${{ matrix.php-version }}" |
| 31 | + extensions: "${{ env.PHP_EXTENSIONS }}" |
| 32 | + coverage: "none" |
| 33 | + |
| 34 | + - name: "Install composer dependencies" |
| 35 | + uses: "ramsey/composer-install@v3" |
| 36 | + with: |
| 37 | + dependency-versions: "${{ matrix.dependencies }}" |
| 38 | + |
| 39 | + - name: "Validate composer" |
| 40 | + run: "composer validate --strict" |
| 41 | + |
| 42 | + - name: "Check composer normalized" |
| 43 | + run: "composer normalize --dry-run" |
| 44 | + |
| 45 | + - name: "Check style" |
| 46 | + run: "composer check-style" |
| 47 | + |
| 48 | + dependency-analysis: |
| 49 | + name: "Dependency Analysis" |
| 50 | + |
| 51 | + runs-on: "ubuntu-latest" |
| 52 | + |
| 53 | + strategy: |
| 54 | + matrix: |
| 55 | + php-version: |
| 56 | + - "7.4" |
| 57 | + - "8.0" |
| 58 | + - "8.1" |
| 59 | + - "8.2" |
| 60 | + - "8.3" |
| 61 | + |
| 62 | + dependencies: |
| 63 | + - "lowest" |
| 64 | + - "highest" |
| 65 | + |
| 66 | + symfony: |
| 67 | + - "~5.4.0" |
| 68 | + - "~6.4.0" |
| 69 | + |
| 70 | + exclude: |
| 71 | + - php-version: "7.4" |
| 72 | + symfony: "~6.4.0" |
| 73 | + - php-version: "8.0" |
| 74 | + symfony: "~6.4.0" |
| 75 | + |
| 76 | + steps: |
| 77 | + - name: "Checkout" |
| 78 | + uses: "actions/checkout@v4" |
| 79 | + |
| 80 | + - name: "Setup PHP, with composer and extensions" |
| 81 | + uses: "shivammathur/setup-php@v2" |
| 82 | + with: |
| 83 | + coverage: "none" |
| 84 | + extensions: "${{ env.PHP_EXTENSIONS }}" |
| 85 | + php-version: "${{ matrix.php-version }}" |
| 86 | + tools: "flex" |
| 87 | + |
| 88 | + - name: "Install composer dependencies" |
| 89 | + uses: "ramsey/composer-install@v3" |
| 90 | + env: |
| 91 | + SYMFONY_REQUIRE: "${{ matrix.symfony }}" |
| 92 | + with: |
| 93 | + dependency-versions: "${{ matrix.dependencies }}" |
| 94 | + |
| 95 | + - name: "Dependency analysis" |
| 96 | + run: "vendor/bin/composer-dependency-analyser" |
| 97 | + |
| 98 | + static-code-analysis: |
| 99 | + name: "Static Code Analysis" |
| 100 | + |
| 101 | + runs-on: "ubuntu-latest" |
| 102 | + |
| 103 | + strategy: |
| 104 | + matrix: |
| 105 | + php-version: |
| 106 | + - "7.4" |
| 107 | + - "8.0" |
| 108 | + - "8.1" |
| 109 | + - "8.2" |
| 110 | + - "8.3" |
| 111 | + |
| 112 | + dependencies: |
| 113 | + - "lowest" |
| 114 | + - "highest" |
| 115 | + |
| 116 | + symfony: |
| 117 | + - "~5.4.0" |
| 118 | + - "~6.4.0" |
| 119 | + |
| 120 | + exclude: |
| 121 | + - php-version: "7.4" |
| 122 | + symfony: "~6.4.0" |
| 123 | + - php-version: "8.0" |
| 124 | + symfony: "~6.4.0" |
| 125 | + |
| 126 | + steps: |
| 127 | + - name: "Checkout" |
| 128 | + uses: "actions/checkout@v4" |
| 129 | + |
| 130 | + - name: "Setup PHP, with composer and extensions" |
| 131 | + uses: "shivammathur/setup-php@v2" |
| 132 | + with: |
| 133 | + php-version: "${{ matrix.php-version }}" |
| 134 | + extensions: "${{ env.PHP_EXTENSIONS }}" |
| 135 | + coverage: "none" |
| 136 | + tools: "flex" |
| 137 | + |
| 138 | + - name: "Install composer dependencies" |
| 139 | + uses: "ramsey/composer-install@v3" |
| 140 | + env: |
| 141 | + SYMFONY_REQUIRE: "${{ matrix.symfony }}" |
| 142 | + with: |
| 143 | + dependency-versions: "${{ matrix.dependencies }}" |
| 144 | + |
| 145 | + - name: "Static analysis" |
| 146 | + run: "vendor/bin/psalm --php-version=${{ matrix.php-version }}" |
| 147 | + |
| 148 | + unit-tests: |
| 149 | + name: "Unit tests" |
| 150 | + |
| 151 | + runs-on: "ubuntu-latest" |
| 152 | + |
| 153 | + strategy: |
| 154 | + matrix: |
| 155 | + php-version: |
| 156 | + - "7.4" |
| 157 | + - "8.0" |
| 158 | + - "8.1" |
| 159 | + - "8.2" |
| 160 | + - "8.3" |
| 161 | + |
| 162 | + dependencies: |
| 163 | + - "lowest" |
| 164 | + - "highest" |
| 165 | + |
| 166 | + symfony: |
| 167 | + - "~5.4.0" |
| 168 | + - "~6.4.0" |
| 169 | + |
| 170 | + exclude: |
| 171 | + - php-version: "7.4" |
| 172 | + symfony: "~6.4.0" |
| 173 | + - php-version: "8.0" |
| 174 | + symfony: "~6.4.0" |
| 175 | + |
| 176 | + steps: |
| 177 | + - name: "Checkout" |
| 178 | + uses: "actions/checkout@v4" |
| 179 | + |
| 180 | + - name: "Setup PHP, with composer and extensions" |
| 181 | + uses: "shivammathur/setup-php@v2" |
| 182 | + with: |
| 183 | + php-version: "${{ matrix.php-version }}" |
| 184 | + extensions: "${{ env.PHP_EXTENSIONS }}" |
| 185 | + coverage: "none" |
| 186 | + tools: "flex" |
| 187 | + |
| 188 | + - name: "Install composer dependencies" |
| 189 | + uses: "ramsey/composer-install@v3" |
| 190 | + env: |
| 191 | + SYMFONY_REQUIRE: "${{ matrix.symfony }}" |
| 192 | + with: |
| 193 | + dependency-versions: "${{ matrix.dependencies }}" |
| 194 | + |
| 195 | + - name: "Run phpunit" |
| 196 | + run: "composer phpunit" |
0 commit comments