bump: postgres ci
icarus_auth Build / Check (pull_request) Successful in 2m37s
icarus_auth Build / build (pull_request) Successful in 2m6s
icarus_auth Build / Rustfmt (pull_request) Successful in 53s
icarus_auth Build / Test Suite (pull_request) Successful in 1m11s
icarus_auth Build / Clippy (pull_request) Successful in 2m27s
icarus_auth Build / Check (pull_request) Successful in 2m37s
icarus_auth Build / build (pull_request) Successful in 2m6s
icarus_auth Build / Rustfmt (pull_request) Successful in 53s
icarus_auth Build / Test Suite (pull_request) Successful in 1m11s
icarus_auth Build / Clippy (pull_request) Successful in 2m27s
This commit is contained in:
@@ -1,14 +1,12 @@
|
|||||||
name: Rust Build
|
name: icarus_auth Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- devel
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- devel
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
@@ -34,16 +32,13 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
name: Test Suite
|
name: Test Suite
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
# --- Add database service definition ---
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:18.3-alpine
|
image: postgres:18.4-alpine
|
||||||
env:
|
env:
|
||||||
# Use secrets for DB init, with fallbacks for flexibility
|
|
||||||
POSTGRES_USER: ${{ secrets.DB_TEST_USER || 'testuser' }}
|
POSTGRES_USER: ${{ secrets.DB_TEST_USER || 'testuser' }}
|
||||||
POSTGRES_PASSWORD: ${{ secrets.DB_TEST_PASSWORD || 'testpassword' }}
|
POSTGRES_PASSWORD: ${{ secrets.DB_TEST_PASSWORD || 'testpassword' }}
|
||||||
POSTGRES_DB: ${{ secrets.DB_TEST_NAME || 'testdb' }}
|
POSTGRES_DB: ${{ secrets.DB_TEST_NAME || 'testdb' }}
|
||||||
# Options to wait until the database is ready
|
|
||||||
options: >-
|
options: >-
|
||||||
--health-cmd pg_isready
|
--health-cmd pg_isready
|
||||||
--health-interval 10s
|
--health-interval 10s
|
||||||
@@ -56,7 +51,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
toolchain: 1.96.1
|
toolchain: 1.96.1
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
# --- Add this step for explicit verification ---
|
|
||||||
- name: Verify Docker Environment
|
- name: Verify Docker Environment
|
||||||
run: |
|
run: |
|
||||||
echo "Runner User Info:"
|
echo "Runner User Info:"
|
||||||
@@ -68,15 +62,12 @@ jobs:
|
|||||||
echo "Checking Docker Daemon Status (ps):"
|
echo "Checking Docker Daemon Status (ps):"
|
||||||
docker ps -a
|
docker ps -a
|
||||||
echo "Docker environment check complete."
|
echo "Docker environment check complete."
|
||||||
# NOTE: Do NOT use continue-on-error here.
|
|
||||||
# If Docker isn't working as expected, the job SHOULD fail here.
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
env:
|
env:
|
||||||
# Define DATABASE_URL for tests to use
|
# Define DATABASE_URL for tests to use
|
||||||
DATABASE_URL: postgresql://${{ secrets.DB_TEST_USER || 'testuser' }}:${{ secrets.DB_TEST_PASSWORD || 'testpassword' }}@postgres:5432/${{ secrets.DB_TEST_NAME || 'testdb' }}
|
DATABASE_URL: postgresql://${{ secrets.DB_TEST_USER || 'testuser' }}:${{ secrets.DB_TEST_PASSWORD || 'testpassword' }}@postgres:5432/${{ secrets.DB_TEST_NAME || 'testdb' }}
|
||||||
RUST_LOG: info # Optional: configure test log level
|
RUST_LOG: info # Optional: configure test log level
|
||||||
SECRET_KEY: ${{ secrets.TOKEN_SECRET_KEY }}
|
SECRET_KEY: ${{ secrets.TOKEN_SECRET_KEY }}
|
||||||
# Make SSH agent available if tests fetch private dependencies
|
|
||||||
SSH_AUTH_SOCK: ${{ env.SSH_AUTH_SOCK }}
|
SSH_AUTH_SOCK: ${{ env.SSH_AUTH_SOCK }}
|
||||||
ENABLE_REGISTRATION: 'TRUE'
|
ENABLE_REGISTRATION: 'TRUE'
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user