File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -2,14 +2,31 @@ name: Run Backend Tests
22
33on :
44 pull_request :
5- branches : [main]
5+ paths :
6+ - " backend/**"
7+ - " .github/workflows/backend-test.yml"
68 push :
79 branches : [main]
810
911jobs :
1012 backend-test :
1113 runs-on : ubuntu-latest
1214
15+ services :
16+ postgres :
17+ image : postgres:latest
18+ env :
19+ POSTGRES_USER : postgres
20+ POSTGRES_PASSWORD : postgres
21+ POSTGRES_DB : ocsl_test
22+ ports :
23+ - 5432:5432
24+ options : >-
25+ --health-cmd pg_isready
26+ --health-interval 10s
27+ --health-timeout 5s
28+ --health-retries 5
29+
1330 steps :
1431 - name : Checkout code
1532 uses : actions/checkout@v4
3249 PYTHONPATH=backend:backend/src pytest backend/test -v --tb=long --junitxml=backend/test-results/junit.xml
3350 env :
3451 GOOGLE_MAPS_API_KEY : " test_api_key_not_used"
52+ POSTGRES_USER : postgres
53+ POSTGRES_PASSWORD : postgres
54+ POSTGRES_HOST : localhost
55+ POSTGRES_PORT : 5432
56+ POSTGRES_DB : ocsl_test
3557
3658 - name : Publish Test Results
3759 uses : EnricoMi/publish-unit-test-result-action@v2
You can’t perform that action at this time.
0 commit comments