feat(DRW-001) initial fixes
This commit is contained in:
@@ -4,6 +4,7 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
REGISTRY: gitea.kawaii-alyssa.dev
|
||||
@@ -41,6 +42,24 @@ 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
|
||||
@@ -61,6 +80,8 @@ jobs:
|
||||
restore-keys: rust-${{ runner.os }}-
|
||||
|
||||
- name: Run tests
|
||||
env:
|
||||
DATABASE_URL: postgres://test:test@localhost:5432/test
|
||||
run: cargo test --release --locked
|
||||
|
||||
docker:
|
||||
|
||||
Reference in New Issue
Block a user