From 7044577f7c75e6493b174ae00000b8425a631264 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Sat, 7 Mar 2020 14:11:11 +0100 Subject: [PATCH] Make sure we are testing with different Symfony versions (#410) * Make sure we are testing with different symfony versions * Upload coverage better * minor --- .github/workflows/ci.yml | 49 ++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3cce73d3..b6de16f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,11 +10,8 @@ jobs: strategy: max-parallel: 10 matrix: - php: ['7.1', '7.2', '7.3', '7.4'] - env: - - SYMFONY_REQUIRE: '3.4.*' - - SYMFONY_REQUIRE: '4.4.*' - - SYMFONY_REQUIRE: '5.0.*' + php: ['7.2', '7.3', '7.4'] + sf_version: ['3.4.*', '4.4.*', '5.0.*'] steps: - name: Set up PHP @@ -27,10 +24,35 @@ jobs: uses: actions/checkout@v2 - name: Download dependencies - run: | - echo "SYMFONY_REQUIRE:" - echo $SYMFONY_REQUIRE - composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable + env: + SYMFONY_REQUIRE: ${{ matrix.sf_version }} + run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable + + - name: Run tests + run: ./vendor/bin/phpunit --testsuite Unit + + build71: + name: Build PHP 7.1 + runs-on: ubuntu-latest + strategy: + max-parallel: 10 + matrix: + sf_version: ['3.4.*', '4.4.*'] + + steps: + - name: Set up PHP + uses: shivammathur/setup-php@2.1.0 + with: + php-version: 7.1 + tools: flex + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Download dependencies + env: + SYMFONY_REQUIRE: ${{ matrix.sf_version }} + run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable - name: Run tests run: ./vendor/bin/phpunit --testsuite Unit @@ -41,10 +63,7 @@ jobs: strategy: max-parallel: 10 matrix: - env: - - SYMFONY_REQUIRE: '3.4.*' - - SYMFONY_REQUIRE: '4.4.*' - - SYMFONY_REQUIRE: '5.0.*' + sf_version: ['3.4.*', '4.4.*', '5.0.*'] steps: - name: Set up PHP @@ -58,6 +77,8 @@ jobs: uses: actions/checkout@v2 - name: Download dependencies + env: + SYMFONY_REQUIRE: ${{ matrix.sf_version }} run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable - name: Start servers @@ -68,7 +89,7 @@ jobs: ./vendor/bin/http_test_server > /dev/null 2>&1 & - name: Run tests - run: ./vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml + run: ./vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml - name: Upload coverage run: |