Skip to content

Commit ed88f93

Browse files
authored
Fix CI env in with postgresql service in all workflows. (#9023)
1 parent 685d58b commit ed88f93

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

.github/workflows/token-test.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@ jobs:
2121
permissions:
2222
id-token: write
2323
runs-on: ubuntu-latest
24+
services:
25+
postgres:
26+
image: postgres
27+
env:
28+
POSTGRES_PASSWORD: postgres
29+
# Set health checks to wait until postgres has started
30+
options: >-
31+
--health-cmd pg_isready
32+
--health-interval 10s
33+
--health-timeout 5s
34+
--health-retries 5
35+
ports:
36+
- 5432:5432
2437

2538
steps:
2639
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
@@ -33,3 +46,5 @@ jobs:
3346
- name: Run test
3447
run: dart test -P presubmit test/service/openid/github_actions_id_token_test.dart
3548
working-directory: app
49+
env:
50+
PUB_POSTGRES_URL: postgresql://postgres:postgres@localhost:5432/postgres?sslmode=disable

.github/workflows/weekly-tests.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,19 @@ jobs:
1313
weekly-tests:
1414
# These tests are run as a sanity-check, usually involving external data or systems.
1515
runs-on: ubuntu-latest
16+
services:
17+
postgres:
18+
image: postgres
19+
env:
20+
POSTGRES_PASSWORD: postgres
21+
# Set health checks to wait until postgres has started
22+
options: >-
23+
--health-cmd pg_isready
24+
--health-interval 10s
25+
--health-timeout 5s
26+
--health-retries 5
27+
ports:
28+
- 5432:5432
1629
steps:
1730
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
1831
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
@@ -22,3 +35,5 @@ jobs:
2235
- name: Run test
2336
run: dart test -P sanity -t sanity
2437
working-directory: app
38+
env:
39+
PUB_POSTGRES_URL: postgresql://postgres:postgres@localhost:5432/postgres?sslmode=disable

0 commit comments

Comments
 (0)