Skip to content

Commit

Permalink
ci(test): Visualize code coverage (#74)
Browse files Browse the repository at this point in the history
Upload to Codecov and add comments to PRs.
  • Loading branch information
5ouma committed Jun 12, 2024
1 parent 9b573bc commit e5ccc4a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ flowchart LR
end
feature1 & feature2 & feature3 -- Squash Merge --> dev
dev -- Rebase Merge --> main
dev -- Merge --> main
```

<br />
Expand Down
1 change: 1 addition & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
[![Test](https://img.shields.io/github/actions/workflow/status/5ouma/opml-generator/test.yml?label=test&style=flat-square)](https://github.com/5ouma/opml-generator/actions/workflows/test.yml)
[![Gist Update](https://img.shields.io/github/actions/workflow/status/5ouma/opml-generator/gist-update.yml?label=Gist%20Update&style=flat-square)](https://github.com/5ouma/opml-generator/actions/workflows/gist-update.yml)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/5ouma/opml-generator/main.svg?style=flat-square)](https://results.pre-commit.ci/latest/github/5ouma/opml-generator/main)
[![codecov](https://codecov.io/github/5ouma/opml-generator/graph/badge.svg?token=ICJ7C3IDX7)](https://codecov.io/github/5ouma/opml-generator)

</div>

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
deno-version: v1.x

- name: 🧪 Run Tests
run: deno task test
run: deno task cov

- name: 🧹 Lint Check
run: deno lint
Expand All @@ -39,3 +39,8 @@ jobs:

- name: 🔍 Type Check
run: deno check ./**/*.ts

- name: ☂️ Upload Coverage
uses: codecov/codecov-action@v4
with:
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 @@
/coverage
/coverage.lcov
3 changes: 2 additions & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"test": { "include": ["src/", "test/"] },
"tasks": {
"gen": "deno run --allow-read --allow-write ./src/main.ts",
"test": "deno test --allow-read --allow-write --parallel --shuffle"
"test": "deno test --allow-read --allow-write --parallel --shuffle",
"cov": "deno task test --coverage && deno coverage --lcov > coverage.lcov"
},
"imports": {
"@libs/xml": "jsr:@libs/[email protected]",
Expand Down

0 comments on commit e5ccc4a

Please sign in to comment.