Skip to content

Commit

Permalink
ci: configuring database for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasauler committed Sep 30, 2024
1 parent e23d08e commit bed3e9b
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ jobs:
build-and-test:
docker:
- image: cimg/rust:1.81.0
environment:
# Fail the build if there are warnings
RUSTFLAGS: "-D warnings"
CARGO_INCREMENTAL: 0
# RUSTC_WRAPPER: "sccache"
environment:
# Fail the build if there are warnings
RUSTFLAGS: "-D warnings"
CARGO_INCREMENTAL: 0
# RUSTC_WRAPPER: "sccache"
- image: cimg/postgres:17.0
environment:
POSTGRES_USER: postgres
steps:
- checkout
- run:
Expand Down Expand Up @@ -52,6 +55,8 @@ jobs:
name: Run tests
command: |
cargo nextest run --no-fail-fast --archive-file nextest-archive.tar.zst
environment:
DATABASE_URL: postgresql://postgres@localhost/circle_test

security:
docker:
Expand Down Expand Up @@ -162,6 +167,8 @@ jobs:
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

0 comments on commit bed3e9b

Please sign in to comment.