|
45 | 45 | - name: Analyze Source
|
46 | 46 | run: vendor/bin/psalm -c $GITHUB_WORKSPACE/psalm.xml
|
47 | 47 |
|
48 |
| - phpunit-tests: |
49 |
| - name: PHPUnit Test Suite |
| 48 | + stable-tests: |
| 49 | + name: Test against Symfony Stable |
| 50 | + runs-on: ubuntu-latest |
| 51 | + |
| 52 | + strategy: |
| 53 | + fail-fast: false |
| 54 | + matrix: |
| 55 | + php-versions: ['7.2', '7.3', '7.4'] |
| 56 | + symfony-version: ['4.4.*', '5.0.*'] |
| 57 | + |
| 58 | + steps: |
| 59 | + - name: Set PHP Version |
| 60 | + run: sudo update-alternatives --set php /usr/bin/php${{ matrix.php-versions }} |
| 61 | + |
| 62 | + - name: Disable Xdebug |
| 63 | + run: sudo rm /etc/php/${{ matrix.php-versions }}/cli/conf.d/20-xdebug.ini |
| 64 | + |
| 65 | + - name: Get PHP Version |
| 66 | + run: | |
| 67 | + ver=$(php -v | grep -oP '(?<=PHP )\d.\d') |
| 68 | + echo "::set-output name=version::$ver" |
| 69 | + id: php-ver |
| 70 | + |
| 71 | + - name: Using PHP Version from matrix |
| 72 | + run: | |
| 73 | + echo "Runner is not using PHP Version defined in the php-versions matrix." |
| 74 | + php -v |
| 75 | + exit 1 |
| 76 | + if: steps.php-ver.outputs.version != matrix.php-versions |
| 77 | + |
| 78 | + - name: Checkout |
| 79 | + |
| 80 | + |
| 81 | + - name: Install Global Dependencies |
| 82 | + run: | |
| 83 | + composer global require --no-progress --no-scripts --no-plugins symfony/flex dev-master |
| 84 | +
|
| 85 | + - name: Install dependencies |
| 86 | + run: | |
| 87 | + composer config minimum-stability stable |
| 88 | + composer install --prefer-dist --no-progress --no-suggest |
| 89 | + env: |
| 90 | + SYMFONY_REQUIRE: ${{ matrix.symfony-version }} |
| 91 | + |
| 92 | + - name: Unit Tests |
| 93 | + run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite unit |
| 94 | + if: always() |
| 95 | + |
| 96 | + - name: Functional Tests |
| 97 | + run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite functional |
| 98 | + if: always() |
| 99 | + |
| 100 | + - name: Integration Tests |
| 101 | + run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite integration |
| 102 | + if: always() |
| 103 | + |
| 104 | + dev-master-tests: |
| 105 | + name: Test against Symfony Master |
50 | 106 | runs-on: ubuntu-latest
|
51 | 107 |
|
52 | 108 | strategy:
|
@@ -91,3 +147,50 @@ jobs:
|
91 | 147 | - name: Integration Tests
|
92 | 148 | run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite integration
|
93 | 149 | if: always()
|
| 150 | + |
| 151 | + lowest-version-tests: |
| 152 | + name: Test with lowest dependency versions |
| 153 | + runs-on: ubuntu-latest |
| 154 | + |
| 155 | + strategy: |
| 156 | + fail-fast: false |
| 157 | + matrix: |
| 158 | + php-versions: ['7.2', '7.3', '7.4'] |
| 159 | + |
| 160 | + steps: |
| 161 | + - name: Set PHP Version |
| 162 | + run: sudo update-alternatives --set php /usr/bin/php${{ matrix.php-versions }} |
| 163 | + |
| 164 | + - name: Disable Xdebug |
| 165 | + run: sudo rm /etc/php/${{ matrix.php-versions }}/cli/conf.d/20-xdebug.ini |
| 166 | + |
| 167 | + - name: Get PHP Version |
| 168 | + run: | |
| 169 | + ver=$(php -v | grep -oP '(?<=PHP )\d.\d') |
| 170 | + echo "::set-output name=version::$ver" |
| 171 | + id: php-ver |
| 172 | + |
| 173 | + - name: Using PHP Version from matrix |
| 174 | + run: | |
| 175 | + echo "Runner is not using PHP Version defined in the php-versions matrix." |
| 176 | + php -v |
| 177 | + exit 1 |
| 178 | + if: steps.php-ver.outputs.version != matrix.php-versions |
| 179 | + |
| 180 | + - name: Checkout |
| 181 | + |
| 182 | + |
| 183 | + - name: Install dependencies |
| 184 | + run: composer update --prefer-lowest --prefer-dist --no-progress --no-suggest |
| 185 | + |
| 186 | + - name: Unit Tests |
| 187 | + run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite unit |
| 188 | + if: always() |
| 189 | + |
| 190 | + - name: Functional Tests |
| 191 | + run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite functional |
| 192 | + if: always() |
| 193 | + |
| 194 | + - name: Integration Tests |
| 195 | + run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite integration |
| 196 | + if: always() |
0 commit comments