diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index 0f150b51a4..d73a64c44f 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -47,27 +47,15 @@ jobs: uses: FedericoCarboni/setup-ffmpeg@v2 # v2.0.0 # Coverage. - - name: run coverage tests + - name: Run coverage tests run: dotnet test Backend.Tests/Backend.Tests.csproj shell: bash - - name: Upload coverage report - id: uploadCoverage - continue-on-error: true - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 + - name: Upload coverage artifact + uses: actions/upload-artifact@v3 with: - files: Backend.Tests/coverage.cobertura.xml - flags: backend - name: Backend - fail_ci_if_error: true - - name: Upload coverage report - take 2 (if the first attempt fails) - if: steps.uploadCoverage.outcome == 'failure' - id: uploadCoverage2 - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 - with: - files: Backend.Tests/coverage.cobertura.xml - flags: backend - name: Backend - fail_ci_if_error: true + name: coverage-backend + path: Backend.Tests/coverage.cobertura.xml + retention-days: 7 # Development build. - run: dotnet build BackendFramework.sln diff --git a/.github/workflows/codecov_upload.yml b/.github/workflows/codecov_upload.yml new file mode 100644 index 0000000000..f68cecc394 --- /dev/null +++ b/.github/workflows/codecov_upload.yml @@ -0,0 +1,40 @@ +name: codecov_upload + +on: + push: + branches: [master] + pull_request: + branches: [master] + workflow_run: + workflows: [backend, frontend] + types: completed + +permissions: + contents: read + +jobs: + upload_coverage: + runs-on: ubuntu-latest + steps: + - name: Download backend coverage artifact + uses: actions/download-artifact@v3 + with: + name: coverage-backend + path: coverage.cobertura.xml + - name: Upload backend coverage report + uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 + with: + files: coverage.cobertura.xml + flags: backend + name: Backend + - name: Download frontend coverage artifact + uses: actions/download-artifact@v3 + with: + name: coverage-frontend + path: clover.xml + - name: Upload frontend coverage report + uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 + with: + files: clover.xml + flags: frontend + name: Frontend diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 41beb712e3..aac47734a1 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -44,24 +44,12 @@ jobs: - run: npm run test-frontend:coverage env: CI: true - - name: Upload coverage report - id: uploadCoverage - continue-on-error: true - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 + - name: Upload coverage artifact + uses: actions/upload-artifact@v3 with: - files: coverage/clover.xml - flags: frontend - name: Frontend - fail_ci_if_error: true - - name: Upload coverage report - take 2 (if the first attempt fails) - if: steps.uploadCoverage.outcome == 'failure' - id: uploadCoverage2 - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 - with: - files: coverage/clover.xml - flags: frontend - name: Frontend - fail_ci_if_error: true + name: coverage-frontend + path: coverage/clover.xml + retention-days: 7 # Release build. - run: npm run build