diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 996a4a70..5b480c36 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,21 +30,21 @@ jobs: php-version: ['7.4', '8.0', '8.1', '8.2', '8.3'] include: - php-version: '7.4' - sf-version: '5.4.*' + sf-version: '5.4' - php-version: '8.0' - sf-version: '6.0.*' + sf-version: '6.0' - php-version: '8.1' - sf-version: '6.0.*' + sf-version: '6.0' - php-version: '8.1' - sf-version: '6.1.*' + sf-version: '6.1' - php-version: '8.2' - sf-version: '6.2.*' + sf-version: '6.2' - php-version: '8.3' - sf-version: '6.3.*' + sf-version: '6.3' - php-version: '8.3' - sf-version: '6.4.*' + sf-version: '6.4' - php-version: '8.3' - sf-version: '7.0.*' + sf-version: '7.0' name: integration-tests (PHP ${{ matrix.php-version }}) (Symfony ${{ matrix.sf-version }}) steps: @@ -58,14 +58,19 @@ jobs: run: composer validate - name: Install dependencies env: - SYMFONY_REQUIRE: ${{ matrix.sf-version }} + SYMFONY_REQUIRE: '${{ matrix.sf-version }}.*' run: composer install --prefer-dist --no-progress - - name: "Remove doctrine/annotations" + - name: Remove doctrine/annotations if: matrix.php-version != '7.4' run: | composer remove --dev doctrine/annotations - name: Run test suite - run: composer test:unit + run: composer test:unit -- --coverage-clover coverage.xml + - name: Upload coverage file + uses: actions/upload-artifact@v3 + with: + name: 'phpunit-${{ matrix.php-version }}-${{ matrix.sf-version }}-coverage' + path: 'coverage.xml' code-style: runs-on: ubuntu-latest @@ -105,3 +110,25 @@ jobs: uses: ibiqlik/action-yamllint@v3 with: config_file: .yamllint.yml + + upload-coverage: + name: Upload coverage to Codecov + runs-on: ubuntu-latest + needs: + - integration-tests + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: Download coverage files + uses: actions/download-artifact@v4 + with: + path: reports + + - name: Upload to Codecov + uses: codecov/codecov-action@v4 + with: + directory: reports diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 25bcf37c..d50518cb 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -14,6 +14,7 @@ +