feat(DRW-001) more fixes to ci
This commit is contained in:
@@ -42,24 +42,6 @@ jobs:
|
||||
name: Unit Tests
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
# cargo build never touches a database (no compile-time-checked sqlx
|
||||
# macros are used anywhere), but the tests do -- #[sqlx::test] spins up
|
||||
# a real, freshly-migrated database per test, which needs an actual
|
||||
# Postgres server to connect to and CREATE DATABASE against.
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:15-alpine
|
||||
env:
|
||||
POSTGRES_USER: test
|
||||
POSTGRES_PASSWORD: test
|
||||
POSTGRES_DB: test
|
||||
ports:
|
||||
- 5432:5432
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -80,9 +62,7 @@ jobs:
|
||||
restore-keys: rust-${{ runner.os }}-
|
||||
|
||||
- name: Run tests
|
||||
env:
|
||||
DATABASE_URL: postgres://test:test@localhost:5432/test
|
||||
run: cargo test --release --locked -- --test-threads=4
|
||||
run: cargo test --release --locked
|
||||
|
||||
docker:
|
||||
name: Docker
|
||||
|
||||
Reference in New Issue
Block a user