Skip to content

Commit

Permalink
ci: add code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Net-Mist committed Jan 11, 2024
1 parent 220b9ea commit d849ffa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:

jobs:
fmt:
fmt-lint-build-test:
runs-on: ubuntu-latest
env:
DATABASE_URL: sqlite://${{ github.workspace }}/examples/universe.db
Expand All @@ -22,7 +22,15 @@ jobs:
- name: Test dev
run: cargo test
- name: Build release
run: cargo build
run: cargo build --release
- name: Test release
run: cargo test

run: cargo test --release
- name: Install code coverage tool
run: cargo install cargo-tarpaulin
- name: Generate code coverage
run: cargo tarpaulin --out Html
- name: Archive code coverage results
uses: actions/upload-artifact@v1
with:
name: code-coverage-report
path: tarpaulin-report.html
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
target
old
.cargo
tarpaulin-report.html
1 change: 0 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ Contains code to connect and read from the DB, process the CLI input and definin

## TODO

- coverage is missing
- bulding the docker image
- pushing to dockerhub with a dev tag
- release-please
Expand Down

0 comments on commit d849ffa

Please sign in to comment.