Skip to content

Commit b2c0467

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

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

.github/workflows/validate.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ jobs:
2424
${{ runner.os }}-build-${{ env.cache-name }}-
2525
${{ runner.os }}-build-
2626
${{ runner.os }}-
27-
2827
- name: ⎔ Setup node
2928
uses: actions/setup-node@v1
3029
with:
@@ -40,21 +39,24 @@ jobs:
4039
run: npm run check
4140

4241
- name: 🧪 Test
43-
uses: actions/checkout@master
44-
uses: codecov/codecov-action@v1
4542
run: npm run coverage
46-
run: bash <(curl -s https://codecov.io/bash) # Upload to Codecov
43+
44+
- name: ⏫ Upload coverage artifacts
45+
uses: actions/upload-artifact@v2
46+
with:
47+
name: coverage
48+
path: |
49+
.coverage
4750
4851
- name: 👷‍♀️ Build
4952
run: npm run build -- --prod
5053

51-
- name: ⏫ Upload artifacts
54+
- name: ⏫ Upload build artifacts
5255
uses: actions/upload-artifact@v2
5356
with:
5457
name: build
5558
path: |
5659
build
57-
5860
deploy:
5961
name: 'Deploy'
6062
runs-on: ubuntu-latest
@@ -64,11 +66,25 @@ jobs:
6466
uses: actions/download-artifact@v2
6567
with:
6668
name: build
67-
- uses: actions/checkout@v1
69+
- uses: actions/checkout@v2
6870
- uses: netlify/actions/cli@master
6971
env:
7072
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
7173
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
7274
with:
7375
args: deploy --dir=build --prod
7476
secrets: '["NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID"]'
77+
78+
codecov:
79+
name: 'Upload coverage report'
80+
runs-on: ubuntu-latest
81+
needs: deploy
82+
steps:
83+
- name: ⏬ Download build artifacts from build job
84+
uses: actions/download-artifact@v2
85+
with:
86+
name: coverage
87+
- uses: actions/checkout@v2
88+
- uses: codecov/codecov-action@v1
89+
with:
90+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)