From 9971c3587b55c938b1b57c956120f60c492b436a Mon Sep 17 00:00:00 2001 From: AnhQuan Nguyen Date: Thu, 2 May 2024 18:37:48 -0700 Subject: [PATCH] postgres setup --- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 20 +++++++------------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 458f552d6..48cd0da45 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -49,7 +49,7 @@ jobs: TEST_DIR: packages/core services: postgres: - image: postgres:14.5 + image: postgres:16.2 env: POSTGRES_USER: conduit_test_user POSTGRES_PASSWORD: conduit! diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 354529ff8..d6ad7bc81 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -56,19 +56,13 @@ jobs: TEST_VALUE: 1 TEST_BOOL: true steps: - - name: Start PostgreSQL - run: | - mkdir -p $HOME/datadir - initdb -U postgres -D $HOME/datadir - pg_ctl -o "-p ${{ env.POSTGRES_PORT }}" -D $HOME/datadir start - - name: Create database - env: - PGUSER: postgres - PGPORT: 15432 - run: | - createuser -s -e -g postgres ${{ env.POSTGRES_USER }} - psql --command="ALTER USER ${{ env.POSTGRES_USER }} WITH PASSWORD '${{ env.POSTGRES_PASSWORD }}'" - createdb --owner=${{ env.POSTGRES_USER }} ${{ env.POSTGRES_DB }} + - name: Setup PostgreSQL for Linux/macOS/Windows + uses: ikalnytskyi/action-setup-postgres@v6 + with: + username: conduit_test_user + password: conduit! + database: conduit_test_db + port: 15432 - uses: actions/checkout@v4 - uses: dart-lang/setup-dart@v1 with: