Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Postgres to CI environment #27

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion .github/workflows/build_local_backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,25 @@ jobs:
build_and_test:
name: Build and Test Convex Backend
runs-on: [self-hosted, aws, x64, xlarge]

services:
# Label used to access service container
postgres:
# Docker Hub image
image: bitnami/postgresql:13
# Provide the password for postgres
env:
POSTGRESQL_PASSWORD: postgres
POSTGRESQL_MAX_CONNECTIONS: 500
POSTGRESQL_REPLICATION_USE_PASSFILE: no
# Set health checks to wait until postgres has started
options: >-
--health-cmd "pg_isready -U postgres" --health-interval 10s
--health-timeout 5s --health-retries 5 --name postgres
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432

steps:
- name: Checkout repo
uses: actions/checkout@v4
Expand Down Expand Up @@ -61,7 +80,10 @@ jobs:
uses: taiki-e/install-action@cargo-nextest

- name: Build rust tests
run: cargo nextest run --no-run --profile ci
run: cargo nextest run --no-run --profile ci

- name: Run Rust tests
env:
CI_PGUSER: postgres
CI_PGPASSWORD: postgres
run: DISABLE_FUZZY_TEXT_SEARCH=true cargo nextest run --profile ci
Loading