feat(dev): don't stop remainder of tests in ci when only one test fails

This commit is contained in:
perf3ct 2025-07-17 18:48:30 +00:00
parent c0e8864280
commit f12169c327
2 changed files with 6 additions and 6 deletions

View File

@ -17,7 +17,7 @@ env:
jobs: jobs:
integration-tests: integration-tests:
runs-on: ubuntu-latest runs-on: ubuntu-latest
services: services:
postgres: postgres:
image: postgres:17 image: postgres:17
@ -107,7 +107,7 @@ jobs:
echo "Waiting for readur server... ($i/30)" echo "Waiting for readur server... ($i/30)"
sleep 2 sleep 2
done done
# Verify the server is actually running # Verify the server is actually running
if ! curl -f http://localhost:8000/api/health > /dev/null 2>&1; then if ! curl -f http://localhost:8000/api/health > /dev/null 2>&1; then
echo "ERROR: Server failed to start properly!" echo "ERROR: Server failed to start properly!"
@ -125,7 +125,7 @@ jobs:
sleep 1 sleep 1
done done
echo "PostgreSQL is ready!" echo "PostgreSQL is ready!"
- name: Verify database connection - name: Verify database connection
run: | run: |
echo "Testing database connection..." echo "Testing database connection..."
@ -137,7 +137,7 @@ jobs:
echo "Running tests with DATABASE_URL: $DATABASE_URL" echo "Running tests with DATABASE_URL: $DATABASE_URL"
echo "Environment check:" echo "Environment check:"
env | grep -E "(DATABASE_URL|JWT_SECRET|API_URL)" | sort env | grep -E "(DATABASE_URL|JWT_SECRET|API_URL)" | sort
cargo test --test '*' --features test-utils -- --test-threads=1 cargo test --test '*' --features test-utils --no-fail-fast -- --test-threads=1
env: env:
DATABASE_URL: ${{ env.DATABASE_URL }} DATABASE_URL: ${{ env.DATABASE_URL }}
TEST_DATABASE_URL: ${{ env.DATABASE_URL }} TEST_DATABASE_URL: ${{ env.DATABASE_URL }}

View File

@ -60,8 +60,8 @@ jobs:
- name: Run Rust unit tests - name: Run Rust unit tests
run: | run: |
cargo test --lib cargo test --lib --no-fail-fast
cargo test --tests unit_tests cargo test --tests unit_tests --no-fail-fast
env: env:
RUST_BACKTRACE: 1 RUST_BACKTRACE: 1