Skip to content

Commit 53e8544

Browse files
committed
Attempt to fix Codecov integration
1 parent 3e5d9da commit 53e8544

File tree

1 file changed

+33
-7
lines changed

1 file changed

+33
-7
lines changed

.github/workflows/validate.yml

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
name: validate
23
on:
34
push:
@@ -24,7 +25,6 @@ jobs:
2425
${{ runner.os }}-build-${{ env.cache-name }}-
2526
${{ runner.os }}-build-
2627
${{ runner.os }}-
27-
2828
- name: ⎔ Setup node
2929
uses: actions/setup-node@v1
3030
with:
@@ -40,10 +40,7 @@ jobs:
4040
run: npm run check
4141

4242
- name: 🧪 Test
43-
uses: actions/checkout@master
44-
uses: codecov/codecov-action@v1
45-
run: npm run coverage
46-
run: bash <(curl -s https://codecov.io/bash) # Upload to Codecov
43+
run: npm run test
4744

4845
- name: 👷‍♀️ Build
4946
run: npm run build -- --prod
@@ -54,7 +51,7 @@ jobs:
5451
name: build
5552
path: |
5653
build
57-
54+
5855
deploy:
5956
name: 'Deploy'
6057
runs-on: ubuntu-latest
@@ -64,11 +61,40 @@ jobs:
6461
uses: actions/download-artifact@v2
6562
with:
6663
name: build
67-
- uses: actions/checkout@v1
64+
- uses: actions/checkout@v2
6865
- uses: netlify/actions/cli@master
6966
env:
7067
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
7168
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
7269
with:
7370
args: deploy --dir=build --prod
7471
secrets: '["NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID"]'
72+
73+
test_coverage:
74+
name: 'Run test coverage'
75+
runs-on: ubuntu-latest
76+
needs: deploy
77+
steps:
78+
- name: 🧪 Test coverage
79+
run: npm run coverage
80+
81+
- name: ⏫ Upload artifacts
82+
uses: actions/upload-artifact@v2
83+
with:
84+
name: coverage
85+
path: |
86+
coverage
87+
88+
upload_coverage_report:
89+
name: 'Upload coverage report'
90+
runs-on: ubuntu-latest
91+
needs: test_coverage
92+
steps:
93+
- name: ⏬ Download build artifacts from build job
94+
uses: actions/download-artifact@v2
95+
with:
96+
name: coverage
97+
- uses: actions/checkout@v2
98+
- uses: codecov/codecov-action@v1
99+
with:
100+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)