From 533815e3e368f67dc31b943e8919cf5761488a54 Mon Sep 17 00:00:00 2001 From: Istvan Soos Date: Mon, 20 Oct 2025 17:02:21 +0200 Subject: [PATCH] Fix CI env in with postgresql service in all workflows. --- .github/workflows/token-test.yml | 15 +++++++++++++++ .github/workflows/weekly-tests.yml | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/.github/workflows/token-test.yml b/.github/workflows/token-test.yml index a73f31538d..d0db5b399d 100644 --- a/.github/workflows/token-test.yml +++ b/.github/workflows/token-test.yml @@ -21,6 +21,19 @@ jobs: permissions: id-token: write runs-on: ubuntu-latest + services: + postgres: + image: postgres + env: + POSTGRES_PASSWORD: postgres + # Set health checks to wait until postgres has started + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 5432:5432 steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c @@ -33,3 +46,5 @@ jobs: - name: Run test run: dart test -P presubmit test/service/openid/github_actions_id_token_test.dart working-directory: app + env: + PUB_POSTGRES_URL: postgresql://postgres:postgres@localhost:5432/postgres?sslmode=disable diff --git a/.github/workflows/weekly-tests.yml b/.github/workflows/weekly-tests.yml index 4cda5f6cba..75d3b5b149 100644 --- a/.github/workflows/weekly-tests.yml +++ b/.github/workflows/weekly-tests.yml @@ -13,6 +13,19 @@ jobs: weekly-tests: # These tests are run as a sanity-check, usually involving external data or systems. runs-on: ubuntu-latest + services: + postgres: + image: postgres + env: + POSTGRES_PASSWORD: postgres + # Set health checks to wait until postgres has started + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 5432:5432 steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c @@ -22,3 +35,5 @@ jobs: - name: Run test run: dart test -P sanity -t sanity working-directory: app + env: + PUB_POSTGRES_URL: postgresql://postgres:postgres@localhost:5432/postgres?sslmode=disable