feat(tests): enable RUST_BACKTRACE on all tests, for debugging
This commit is contained in:
parent
440d6e3f6e
commit
b19123e6f2
|
|
@ -74,6 +74,7 @@ jobs:
|
|||
run: cargo build --release
|
||||
env:
|
||||
DATABASE_URL: postgres://postgres:postgres@localhost:5432/readur_test
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
- name: Build frontend
|
||||
working-directory: ./frontend
|
||||
|
|
@ -92,6 +93,7 @@ jobs:
|
|||
FRONTEND_PATH: ./frontend/dist
|
||||
UPLOAD_PATH: ./uploads
|
||||
WATCH_PATH: ./watch
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
- name: Wait for backend to be ready
|
||||
run: |
|
||||
|
|
@ -104,6 +106,7 @@ jobs:
|
|||
sleep 2
|
||||
done
|
||||
|
||||
|
||||
- name: Install Playwright browsers
|
||||
working-directory: ./frontend
|
||||
run: npx playwright install --with-deps
|
||||
|
|
@ -113,6 +116,7 @@ jobs:
|
|||
run: npm run test:e2e
|
||||
env:
|
||||
VITE_API_URL: http://localhost:8000
|
||||
PLAYWRIGHT_BASE_URL: http://localhost:8000
|
||||
|
||||
- name: Stop backend server
|
||||
if: always()
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ jobs:
|
|||
DATABASE_URL: ${{ env.DATABASE_URL }}
|
||||
TEST_DATABASE_URL: ${{ env.DATABASE_URL }}
|
||||
RUST_LOG: debug
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
- name: Stop readur server
|
||||
if: always()
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@ jobs:
|
|||
run: |
|
||||
cargo test --lib
|
||||
cargo test --tests unit_tests
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
frontend-unit-tests:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ services:
|
|||
|
||||
# Test-specific environment variables
|
||||
RUST_LOG: debug
|
||||
RUST_BACKTRACE: 1
|
||||
TEST_ENV: true
|
||||
|
||||
ports:
|
||||
|
|
|
|||
|
|
@ -185,6 +185,7 @@ run_unit_tests() {
|
|||
local exit_code
|
||||
|
||||
output=$(DATABASE_URL="postgresql://readur_test:readur_test@localhost:5433/readur_test" \
|
||||
RUST_BACKTRACE=1 \
|
||||
cargo test --lib --no-fail-fast 2>&1)
|
||||
exit_code=$?
|
||||
|
||||
|
|
@ -217,6 +218,7 @@ run_integration_tests() {
|
|||
DATABASE_URL="postgresql://readur_test:readur_test@localhost:5433/readur_test" \
|
||||
TEST_DATABASE_URL="postgresql://readur_test:readur_test@localhost:5433/readur_test" \
|
||||
API_URL="http://localhost:8001" \
|
||||
RUST_BACKTRACE=1 \
|
||||
cargo test --test '*' --no-fail-fast 2>&1 | tee "$output_file"
|
||||
|
||||
exit_code=${PIPESTATUS[0]}
|
||||
|
|
|
|||
Loading…
Reference in New Issue