Skip to content

Commit

Permalink
ci: Enable code coverage for TypeScript version (#123)
Browse files Browse the repository at this point in the history
* Enable code coverage for TypeScript version

* Fix coverage job

* Fix labels
  • Loading branch information
romac authored Nov 29, 2022
1 parent 2cff798 commit 1172e6a
Show file tree
Hide file tree
Showing 4 changed files with 2,392 additions and 1,534 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,25 @@ concurrency:

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: test
- name: Run test suite
working-directory: ./js
run: yarn && yarn test

coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Generate code coverage
working-directory: ./js
run: yarn && yarn coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: js/coverage/lcov.info
flags: typescript
fail_ci_if_error: true
3 changes: 3 additions & 0 deletions js/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
node_modules
build
.nyc_output
package-lock.json
coverage
2 changes: 2 additions & 0 deletions js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"prebuild": "yarn lint && yarn format",
"prepublish": "yarn build",
"test": "yarn -s build && node jasmine-testrunner.js",
"coverage": "nyc --reporter=lcov --reporter=text-summary yarn test",
"build": "shx rm -rf ./build && tsc && shx cp -r src/generated build/generated",
"pack-proto": "pbjs -t static-module -w commonjs -o src/generated/codecimpl.js ../proofs.proto",
"define-proto": "pbts src/generated/codecimpl.js -o src/generated/codecimpl.d.ts",
Expand All @@ -42,6 +43,7 @@
"eslint-plugin-simple-import-sort": "^7.0.0",
"jasmine": "^3.5.0",
"jasmine-console-reporter": "^3.1.0",
"nyc": "^15.1.0",
"prettier": "^2.5.1",
"shx": "^0.3.4",
"source-map-support": "^0.5.16",
Expand Down
Loading

0 comments on commit 1172e6a

Please sign in to comment.