From b2c0467c4c43c7033492bc36d72cff7877af4e94 Mon Sep 17 00:00:00 2001 From: Dennis Kigen Date: Wed, 9 Jun 2021 22:01:43 +0300 Subject: [PATCH] Attempt to fix Codecov integration --- .github/workflows/validate.yml | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 2c3bca3..534756d 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -24,7 +24,6 @@ jobs: ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- ${{ runner.os }}- - - name: ⎔ Setup node uses: actions/setup-node@v1 with: @@ -40,21 +39,24 @@ jobs: run: npm run check - name: 🧪 Test - uses: actions/checkout@master - uses: codecov/codecov-action@v1 run: npm run coverage - run: bash <(curl -s https://codecov.io/bash) # Upload to Codecov + + - name: ⏫ Upload coverage artifacts + uses: actions/upload-artifact@v2 + with: + name: coverage + path: | + .coverage - name: 👷‍♀️ Build run: npm run build -- --prod - - name: ⏫ Upload artifacts + - name: ⏫ Upload build artifacts uses: actions/upload-artifact@v2 with: name: build path: | build - deploy: name: 'Deploy' runs-on: ubuntu-latest @@ -64,7 +66,7 @@ jobs: uses: actions/download-artifact@v2 with: name: build - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: netlify/actions/cli@master env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} @@ -72,3 +74,17 @@ jobs: with: args: deploy --dir=build --prod secrets: '["NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID"]' + + codecov: + name: 'Upload coverage report' + runs-on: ubuntu-latest + needs: deploy + steps: + - name: ⏬ Download build artifacts from build job + uses: actions/download-artifact@v2 + with: + name: coverage + - uses: actions/checkout@v2 + - uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file