diff --git a/.github/workflows/loco-gen-ci.yml b/.github/workflows/loco-gen-ci.yml index b170dedbb..71f495953 100644 --- a/.github/workflows/loco-gen-ci.yml +++ b/.github/workflows/loco-gen-ci.yml @@ -52,6 +52,21 @@ jobs: permissions: contents: read + services: + postgres: + image: postgres + env: + POSTGRES_DB: postgres_test + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + ports: + - "5432:5432" + # Set health checks to wait until postgres has started + options: --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + steps: - name: Checkout the code uses: actions/checkout@v4 @@ -71,3 +86,4 @@ jobs: run: cargo test --all-features env: LOCO_DEV_MODE_PATH: ${{ github.workspace }} + DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres_test