diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bdd33bf..041c5f1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -53,7 +53,7 @@ jobs: symfony-version: '5.4' steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Enable coverage if: ${{ matrix.php-version == '8.1' }} @@ -73,7 +73,7 @@ jobs: - name: Setup cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/.composer @@ -105,6 +105,11 @@ jobs: - name: Tests run: make test-unit && make test-functional + # Upload to codacy first as codecov action always remove coverage files despite move_coverage_to_trash at false + - name: Upload coverages to Codacy + if: ${{ env.COVERAGE_TYPE == 'xdebug' }} + run: ${{ env.CODACY_BIN }} report -r build/coverage-phpunit/unit.clover -r build/coverage-behat/clover.xml -r build/coverage-phpunit/functional.clover -t ${{ secrets.CODACY_PROJECT_TOKEN }} --partial + # See the reports at https://codecov.io/gh/yoanm/symfony-jsonrpc-http-server - name: Upload unit tests coverage to codecov if: ${{ env.COVERAGE_TYPE == 'xdebug' }} @@ -114,6 +119,8 @@ jobs: name: "unit-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}" flags: "unit-tests,php-${{ matrix.php-version }},sf-${{ matrix.symfony-version }}" fail_ci_if_error: true + move_coverage_to_trash: false + verbose: ${{ runner.debug == '1' }} - name: Upload functional tests coverage to codecov if: ${{ env.COVERAGE_TYPE == 'xdebug' }} @@ -123,17 +130,15 @@ jobs: name: "functional-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}" flags: "functional-tests,php-${{ matrix.php-version }},sf-${{ matrix.symfony-version }}" fail_ci_if_error: true - - - name: Upload coverages to Codacy - if: ${{ env.COVERAGE_TYPE == 'xdebug' }} - run: ${{ env.CODACY_BIN }} report -r build/coverage-phpunit/unit.clover -r build/coverage-behat/clover.xml -r build/coverage-phpunit/functional.clover -t ${{ secrets.CODACY_PROJECT_TOKEN }} --partial + move_coverage_to_trash: false + verbose: ${{ runner.debug == '1' }} static-checks: name: Static checks runs-on: ubuntu-latest needs: [ tests ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup PHP 8.1 uses: shivammathur/setup-php@v2 @@ -147,7 +152,7 @@ jobs: - name: Setup cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/.composer @@ -171,7 +176,7 @@ jobs: steps: - name: Setup cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ${{ env.CODACY_CACHE_PATH }} @@ -213,7 +218,7 @@ jobs: steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup PHP ${{ matrix.php-version }} uses: shivammathur/setup-php@v2 @@ -227,7 +232,7 @@ jobs: - name: Setup cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/.composer