Skip to content

Commit

Permalink
feat: support database tests in coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasauler committed Sep 30, 2024
1 parent bed3e9b commit b5c5660
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ jobs:
coverage:
docker:
- image: cimg/rust:1.81.0
environment:
DATABASE_URL: postgresql://postgres@localhost/circle_test
steps:
- checkout
- run:
Expand All @@ -163,12 +165,14 @@ jobs:
command: |
echo PLUGGY_CLIENT_ID=$PLUGGY_CLIENT_ID > test.env
echo PLUGGY_CLIENT_SECRET=$PLUGGY_CLIENT_SECRET >> test.env
- run:
name: Database setup
command: |
sqlx migrate run
- run:
name: Running code coverage
command: |
rustup run nightly cargo llvm-cov nextest --locked --all-features --lcov --output-path lcov.info
environment:
DATABASE_URL: postgresql://postgres@localhost/circle_test
- codecov/upload:
file: "./lcov.info"
# token: $CODECOV_TOKEN already default
Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
buildInputs = [
bacon
cargo-expand
cargo-llvm-cov
cargo-nextest
cargo-watch
jq
Expand Down

0 comments on commit b5c5660

Please sign in to comment.