Skip to content

Commit

Permalink
chore: add test result upload to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
kitsonk committed Jan 6, 2025
1 parent 0ceb01c commit a0abb76
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,33 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
version: ["2.0.X", "2.1.X", canary]
version: ["2.1.X"]
steps:
- name: clone repository
uses: actions/checkout@v4

- name: install deno
uses: denoland/setup-deno@v1
uses: denoland/setup-deno@v2
with:
deno-version: ${{ matrix.version }}

- name: run checks
run: deno task check

- name: run tests
continue-on-error: true
run: deno task test:ci

- name: upload test results
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: generate coverage report
run: deno task coverage

- name: upload coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
files: ./cov.lcov
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
cov.lcov
cov/
junit.xml
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"check": "deno fmt --check && deno lint && deno check --doc *.ts",
"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"
"test:ci": "deno test --allow-read --allow-write --unstable-kv --junit-path=junit.xml --coverage=./cov --parallel"
},
"lock": false,
"imports": {
Expand Down

0 comments on commit a0abb76

Please sign in to comment.