Skip to content

Commit 5e6b77d

Browse files
samirsilwalmesaugat
authored andcommitted
Update build workflow to upload codecov file
1 parent 58cf5c8 commit 5e6b77d

File tree

3 files changed

+754
-1049
lines changed

3 files changed

+754
-1049
lines changed

.github/workflows/build-test.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,21 @@ jobs:
2424
with:
2525
node-version: ${{ matrix.node }}
2626
cache: 'yarn'
27-
- run: yarn
28-
- run: yarn build
29-
- run: yarn test
30-
- run: yarn codecov
27+
28+
- name: Install dependencies
29+
run: yarn
30+
31+
- name: Build package
32+
run: yarn build
33+
34+
- name: Run unit tests
35+
run: yarn test
36+
37+
- name: Upload coverage to Codecov
38+
uses: codecov/codecov-action@v4
39+
with:
40+
fail_ci_if_error: true
41+
directory: ./coverage
42+
files: ./lcov.info
43+
token: ${{ secrets.CODECOV_TOKEN }}
44+
verbose: true

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"scripts": {
1919
"transpile": "tsc",
2020
"clean": "rimraf dist",
21-
"codecov": "codecov",
2221
"build": "NODE_ENV=production yarn clean && yarn transpile",
2322
"test": "NODE_ENV=test nyc mocha --recursive test/**/*.test.ts",
2423
"watch": "tsc --watch",
@@ -70,10 +69,9 @@
7069
"@types/node": "^14.17.0",
7170
"chai": "^4.3.7",
7271
"chai-as-promised": "^7.1.1",
73-
"codecov": "^3.8.1",
7472
"fastify": "^4.16.3",
7573
"husky": "^8.0.3",
76-
"lint-staged": "^13.2.2",
74+
"lint-staged": "13.2.2",
7775
"mocha": "^10.2.0",
7876
"node-mocks-http": "^1.12.2",
7977
"nyc": "^15.1.0",

0 commit comments

Comments
 (0)