Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build workflow to upload codecov file #145

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,21 @@ jobs:
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
- run: yarn
- run: yarn build
- run: yarn test
- run: yarn codecov

- name: Install dependencies
run: yarn

- name: Build package
run: yarn build

- name: Run unit tests
run: yarn test

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
directory: ./coverage
files: ./lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"scripts": {
"transpile": "tsc",
"clean": "rimraf dist",
"codecov": "codecov",
"build": "NODE_ENV=production yarn clean && yarn transpile",
"test": "NODE_ENV=test nyc mocha --recursive test/**/*.test.ts",
"watch": "tsc --watch",
Expand Down Expand Up @@ -70,10 +69,9 @@
"@types/node": "^14.17.0",
"chai": "^4.3.7",
"chai-as-promised": "^7.1.1",
"codecov": "^3.8.1",
"fastify": "^4.16.3",
"husky": "^8.0.3",
"lint-staged": "^13.2.2",
"lint-staged": "13.2.2",
"mocha": "^10.2.0",
"node-mocks-http": "^1.12.2",
"nyc": "^15.1.0",
Expand Down
Loading
Loading