chore: add cov:* tasks (#3743)

This commit is contained in:
Asher Gomez 2023-10-29 13:23:03 +09:00 committed by GitHub
parent ab6898e6a1
commit 09759c1945
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 11 deletions

View File

@ -47,10 +47,7 @@ jobs:
run: deno task test:browser
- name: Generate lcov
shell: bash
# excludes tests, testdata, and generated sources from coverage report
run: |
deno coverage ./cov/ --lcov --exclude="test\\.(ts|js)|wasm\\.js|testdata" > cov.lcov
run: deno task cov:gen
- name: Upload coverage
uses: codecov/codecov-action@v3
@ -58,12 +55,6 @@ jobs:
name: ${{ matrix.os }}-${{ matrix.deno }}
files: cov.lcov
- name: Remove coverage report
shell: bash
run: |
rm -rf ./cov/
rm cov.lcov
- name: Release if version change
if: |
matrix.os == 'ubuntu-22.04' &&

2
.gitignore vendored
View File

@ -6,3 +6,5 @@
/crypto/_wasm/target
deno.lock
/console/testdata/unicode_width_crate/target
html_cov/
cov.lcov

View File

@ -18,7 +18,10 @@
"lint": "deno lint && deno task fmt:licence-headers --check && deno task lint:deprecations && deno task lint:doc-imports && deno task lint:circular && deno task lint:tools-types",
"typos": "typos -c ./.github/workflows/typos.toml",
"build:crypto": "deno task --cwd crypto/_wasm wasmbuild",
"wasmbuild": "deno run --unstable -A https://deno.land/x/wasmbuild@0.15.0/main.ts --js-ext mjs --sync"
"wasmbuild": "deno run --unstable -A https://deno.land/x/wasmbuild@0.15.0/main.ts --js-ext mjs --sync",
"cov:clean": "rm -rf cov html_cov cov.lcov",
"cov:gen": "deno coverage ./cov/ --lcov --output=cov.lcov",
"cov:view": "genhtml --ignore-errors unmapped -o html_cov cov.lcov && open html_cov/index.html"
},
"exclude": [
".git",