From c9da8d87e5f0b9f5d3a07ec0862c9f0bf0e8d024 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Tue, 16 Aug 2022 11:07:49 +0530 Subject: [PATCH] ci: dont submit coverage if tests din't run --- .github/workflows/server-mariadb-tests.yml | 5 +++++ .github/workflows/server-postgres-tests.yml | 5 +++++ .github/workflows/ui-tests.yml | 7 ++++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/server-mariadb-tests.yml b/.github/workflows/server-mariadb-tests.yml index 64e6cdc381..2a0915f387 100644 --- a/.github/workflows/server-mariadb-tests.yml +++ b/.github/workflows/server-mariadb-tests.yml @@ -20,6 +20,9 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 60 + outputs: + build: ${{ steps.check-build.outputs.build }} + strategy: fail-fast: false matrix: @@ -144,9 +147,11 @@ jobs: uses: actions/checkout@v3 - name: Download artifacts + if: ${{ needs.test.outputs.build == 'strawberry' }} uses: actions/download-artifact@v3 - name: Upload coverage data + if: ${{ needs.test.outputs.build == 'strawberry' }} uses: codecov/codecov-action@v3 with: name: MariaDB diff --git a/.github/workflows/server-postgres-tests.yml b/.github/workflows/server-postgres-tests.yml index bec635a4e7..1537430384 100644 --- a/.github/workflows/server-postgres-tests.yml +++ b/.github/workflows/server-postgres-tests.yml @@ -19,6 +19,9 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 60 + outputs: + build: ${{ steps.check-build.outputs.build }} + strategy: fail-fast: false matrix: @@ -147,9 +150,11 @@ jobs: uses: actions/checkout@v3 - name: Download artifacts + if: ${{ needs.test.outputs.build == 'strawberry' }} uses: actions/download-artifact@v3 - name: Upload coverage data + if: ${{ needs.test.outputs.build == 'strawberry' }} uses: codecov/codecov-action@v3 with: name: Postgres diff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.yml index 4d5ec5c1db..b1d56a963c 100644 --- a/.github/workflows/ui-tests.yml +++ b/.github/workflows/ui-tests.yml @@ -17,6 +17,8 @@ jobs: test: runs-on: ubuntu-latest timeout-minutes: 60 + outputs: + build: ${{ steps.check-build.outputs.build }} strategy: fail-fast: false @@ -184,18 +186,21 @@ jobs: uses: actions/checkout@v2 - name: Download artifacts + if: ${{ needs.test.outputs.build == 'strawberry' }} uses: actions/download-artifact@v3 - name: Upload python coverage data + if: ${{ needs.test.outputs.build == 'strawberry' }} uses: codecov/codecov-action@v3 with: - name: MariaDB + name: UIBackend fail_ci_if_error: true verbose: true files: ./coverage-py-1/coverage.xml,./coverage-py-2/coverage.xml,./coverage-py-3/coverage.xml flags: server-ui - name: Upload JS coverage data + if: ${{ needs.test.outputs.build == 'strawberry' }} uses: codecov/codecov-action@v3 with: name: Cypress