From 65a7563ac9ecf36395bb7331542b945b2cec5404 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 2 Dec 2021 19:00:17 +0100 Subject: [PATCH] CI: Upload coverage results in a single step (#60834) --- .github/workflows/ci.yaml | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 47dc4a2ca40..ebbd2b2fb9e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -711,18 +711,31 @@ jobs: --durations-min=1 \ -p no:sugar \ tests/components/${{ matrix.group }} + - name: Upload coverage artifact + uses: actions/upload-artifact@v2.2.4 + with: + name: coverage-${{ matrix.python-version }}-${{ matrix.group }} + path: coverage.xml + - name: Check dirty + run: | + ./script/check_dirty + + coverage: + name: Upload test coverage to Codecov + runs-on: ubuntu-latest + needs: + - changes + - pytest + steps: + - name: Check out code from GitHub + uses: actions/checkout@v2.4.0 + - name: Download all coverage artifacts + uses: actions/download-artifact@v2 - name: Upload coverage to Codecov (full coverage) if: needs.changes.outputs.test_full_suite == 'true' uses: codecov/codecov-action@v2.1.0 with: - files: coverage.xml flags: full-suite - name: Upload coverage to Codecov (partial coverage) if: needs.changes.outputs.test_full_suite == 'false' uses: codecov/codecov-action@v2.1.0 - with: - files: coverage.xml - flags: ${{ matrix.group }} - - name: Check dirty - run: | - ./script/check_dirty