Skip to content

Commit

Permalink
test: Use testcontainers for integration tests requiring Postgres
Browse files Browse the repository at this point in the history
Rather than requiring the environment to supply a suitable database, we
may use TestContainers to provision a fresh database for each test.
This allows contributors to run the entire test suite without
project-specific setup, although it does require a working Docker
environment.
  • Loading branch information
andrewaylett committed Jan 3, 2025
1 parent 0056c72 commit 54550c3
Show file tree
Hide file tree
Showing 6 changed files with 289 additions and 24 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,16 +155,6 @@ jobs:
integration-test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres
env:
POSTGRES_USER: atuin
POSTGRES_PASSWORD: pass
POSTGRES_DB: atuin
ports:
- 5432:5432

steps:
- uses: actions/checkout@v4

Expand All @@ -188,8 +178,6 @@ jobs:

- name: Run cargo test
run: cargo nextest run --test '*'
env:
ATUIN_DB_URI: postgres://atuin:pass@localhost:5432/atuin

clippy:
runs-on: ubuntu-latest
Expand Down
Loading

0 comments on commit 54550c3

Please sign in to comment.