Skip to content

Commit e8e5f6f

Browse files
authored
chore: setup Codecov (#266)
* chore: setup Codecov * fix
1 parent c470c4d commit e8e5f6f

File tree

4 files changed

+25
-3
lines changed

4 files changed

+25
-3
lines changed

.github/codecov.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
comment: false
2+
coverage:
3+
status:
4+
project:
5+
default:
6+
informational: true
7+
patch:
8+
default:
9+
informational: true

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,12 @@ jobs:
2626

2727
- name: Check formatting, linting, license headers, types and run tests
2828
run: deno task ok
29+
30+
- name: Create lcov file
31+
run: deno task cov
32+
33+
- name: Upload coverage
34+
uses: codecov/codecov-action@v3
35+
with:
36+
name: ${{ matrix.os }}
37+
files: cov.lcov

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
.env
1+
.env
2+
*.DS_Store
3+
cov/
4+
cov.lcov

deno.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
"db:seed": "deno run --allow-read --allow-env --allow-net --unstable tools/seed_submissions.ts",
77
"db:reset": "deno run --allow-read --allow-env --unstable tools/reset_kv.ts",
88
"start": "deno run --unstable -A --watch=static/,routes/ dev.ts",
9-
"test": "deno test -A --unstable",
9+
"test": "deno test -A --unstable --coverage=./cov",
1010
"check:license": "deno run --allow-read --allow-write tools/check_license.ts",
11-
"ok": "deno fmt --check && deno lint && deno task check:license --check && deno check main.ts && deno task test"
11+
"ok": "deno fmt --check && deno lint && deno task check:license --check && deno check main.ts && deno task test",
12+
"cov": "deno coverage ./cov/ --lcov --exclude='test.ts' > cov.lcov"
1213
},
1314
"importMap": "./import_map.json",
1415
"compilerOptions": {

0 commit comments

Comments
 (0)