Skip to content

Commit

Permalink
chore: add code coverage to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kitsonk committed Mar 4, 2024
1 parent f20afd5 commit d5ec1e3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,13 @@ jobs:
run: deno lint

- name: run tests
run: deno task test
run: deno task test:ci

- name: generate coverage report
run: deno task coverage

- name: upload coverage
uses: codecov/codecov-action@v4
with:
files: ./cov.lcov
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cov.lcov
cov/
4 changes: 3 additions & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"./ndjson": "./ndjson.ts"
},
"tasks": {
"test": "deno test --allow-read --allow-write --unstable-kv"
"coverage": "deno coverage --lcov --output=cov.lcov ./cov",
"test": "deno test --allow-read --allow-write --unstable-kv --parallel",
"test:ci": "deno test --allow-read --allow-write --unstable-kv --coverage=./cov --parallel"
},
"lock": false
}

0 comments on commit d5ec1e3

Please sign in to comment.