From be96130e29ba0f90c915ae5d9df5eb778a09d527 Mon Sep 17 00:00:00 2001
From: Michael Kriese <michael.kriese@visualon.de>
Date: Fri, 28 Feb 2020 14:28:23 +0100
Subject: [PATCH] chore: fix coverage upload (#5593)

---
 .github/workflows/test.yml | 30 ++++++++----------------------
 1 file changed, 8 insertions(+), 22 deletions(-)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 68001920c9..06333d3135 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -124,6 +124,14 @@ jobs:
           name: coverage
           path: coverage
 
+      - name: Codecov
+        shell: bash
+        if: always() && env.coverage == 'true'
+        continue-on-error: true
+        run: bash <(curl -s https://codecov.io/bash)
+        env:
+          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
+
       - name: E2E Test
         run: yarn test-e2e
 
@@ -192,25 +200,3 @@ jobs:
 
       - name: Type check
         run: yarn type-check
-
-  coverage:
-    needs: test
-    runs-on: ubuntu-latest
-
-    # codecov shouldn't need more than 3 min
-    timeout-minutes: 3
-
-    steps:
-      - uses: actions/checkout@v2
-
-      - name: Download coverage
-        uses: actions/download-artifact@v1
-        with:
-          name: coverage
-
-      - name: Codecov
-        shell: bash
-        continue-on-error: true
-        run: bash <(curl -s https://codecov.io/bash)
-        env:
-          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-- 
GitLab