Skip to content

Commit

Permalink
Attempt to fix Codecov integration
Browse files Browse the repository at this point in the history
  • Loading branch information
denniskigen committed Jun 9, 2021
1 parent 3e5d9da commit 53e8544
Showing 1 changed file with 33 additions and 7 deletions.
40 changes: 33 additions & 7 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

name: validate
on:
push:
Expand All @@ -24,7 +25,6 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: ⎔ Setup node
uses: actions/setup-node@v1
with:
Expand All @@ -40,10 +40,7 @@ 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
run: npm run test

- name: 👷‍♀️ Build
run: npm run build -- --prod
Expand All @@ -54,7 +51,7 @@ jobs:
name: build
path: |
build
deploy:
name: 'Deploy'
runs-on: ubuntu-latest
Expand All @@ -64,11 +61,40 @@ 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 }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
with:
args: deploy --dir=build --prod
secrets: '["NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID"]'

test_coverage:
name: 'Run test coverage'
runs-on: ubuntu-latest
needs: deploy
steps:
- name: 🧪 Test coverage
run: npm run coverage

- name: ⏫ Upload artifacts
uses: actions/upload-artifact@v2
with:
name: coverage
path: |
coverage
upload_coverage_report:
name: 'Upload coverage report'
runs-on: ubuntu-latest
needs: test_coverage
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 }}

1 comment on commit 53e8544

@vercel
Copy link

@vercel vercel bot commented on 53e8544 Jun 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.