Skip to content

Commit 649a622

Browse files
Merge pull request #906 from puppetlabs/update-codecov
(maint) Update vscode-ci codecov
2 parents b3425a2 + 133f9ac commit 649a622

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

.github/workflows/vscode-ci.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
- "main"
1010
workflow_dispatch:
1111

12+
env:
13+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
14+
1215
jobs:
1316
build:
1417
runs-on: ${{ matrix.os }}
@@ -48,7 +51,7 @@ jobs:
4851
4952
- name: Install psake
5053
shell: pwsh
51-
run: Install-Module psake -Force
54+
run: Install-Module -Name psake -RequiredVersion 4.9.0 -Force
5255

5356
- name: npm install
5457
shell: pwsh
@@ -73,12 +76,16 @@ jobs:
7376
npm run test:coverage
7477
7578
- name: Upload Coverage
76-
if: runner.os == 'Linux'
77-
env:
78-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
79-
run: |
80-
npm run coverage:upload
81-
79+
if: |
80+
runner.os == 'Linux' &&
81+
env.CODECOV_TOKEN != ''
82+
uses: codecov/codecov-action@v4
83+
with:
84+
token: ${{ secrets.CODECOV_TOKEN }}
85+
files: ./coverage.xml
86+
fail_ci_if_error: true
87+
verbose: true
88+
8289
- name: vsce package
8390
if: runner.os == 'Linux'
8491
env:

0 commit comments

Comments
 (0)