-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f5fc43
commit 9e97972
Showing
1 changed file
with
86 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,27 @@ jobs: | |
required: | ||
runs-on: ubuntu-latest | ||
name: ubuntu / ${{ matrix.toolchain }} | ||
services: | ||
postgres: | ||
build: | ||
context: docker | ||
dockerfile: postgres.Dockerfile | ||
env: | ||
POSTGRES_USER: username | ||
POSTGRES_PASSWORD: password | ||
POSTGRES_HOST: "127.0.0.1" | ||
POSTGRES_DB: "pgboss" | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 127.0.0.1:5444:5432 | ||
command: | ||
- "postgres" | ||
- "-c" | ||
- "config_file=/var/lib/postgresql/postgresql.conf" | ||
strategy: | ||
matrix: | ||
# run on stable and beta to ensure that tests won't break on the next version of the rust | ||
|
@@ -37,15 +58,9 @@ jobs: | |
# enable this ci template to run regardless of whether the lockfile is checked in or not | ||
if: hashFiles('Cargo.lock') == '' | ||
run: cargo generate-lockfile | ||
- name: ensure PostgreSQL service | ||
run: | | ||
docker compose -f docker/compose.yaml up -d --build | ||
docker ps | ||
sleep 10 | ||
docker compose -f docker/compose.yaml logs postgres --tail 10 | ||
- name: run e2e tests | ||
env: | ||
POSTGRES_URL: postgres://username:[email protected]:5444/pgboss | ||
POSTGRES_URL: postgres://username:[email protected]:5444/pgboss | ||
run: cargo test --locked --all-features --all-targets --test e2e -- --nocapture | ||
# https://github.com/rust-lang/cargo/issues/6669 | ||
- name: cargo test --doc | ||
|
@@ -75,6 +90,27 @@ jobs: | |
# This action is run on ubuntu with the stable toolchain, as it is not expected to fail | ||
runs-on: ubuntu-latest | ||
name: ubuntu / stable / minimal-versions | ||
services: | ||
postgres: | ||
build: | ||
context: docker | ||
dockerfile: postgres.Dockerfile | ||
env: | ||
POSTGRES_USER: username | ||
POSTGRES_PASSWORD: password | ||
POSTGRES_HOST: "127.0.0.1" | ||
POSTGRES_DB: "pgboss" | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 127.0.0.1:5444:5432 | ||
command: | ||
- "postgres" | ||
- "-c" | ||
- "config_file=/var/lib/postgresql/postgresql.conf" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -87,20 +123,34 @@ jobs: | |
run: rustup default stable | ||
- name: cargo update -Zminimal-versions | ||
run: cargo +nightly update -Zminimal-versions | ||
- name: ensure PostgreSQL service | ||
run: | | ||
docker compose -f docker/compose.yaml up -d --build | ||
docker ps | ||
sleep 10 | ||
docker compose -f docker/compose.yaml logs postgres --tail 10 | ||
- name: run e2e tests | ||
env: | ||
POSTGRES_URL: postgres://username:[email protected]:5444/pgboss | ||
POSTGRES_URL: postgres://username:[email protected]:5444/pgboss | ||
run: cargo test --locked --all-features --all-targets --test e2e -- --nocapture | ||
os-check: | ||
# run cargo test on mac and windows | ||
runs-on: ${{ matrix.os }} | ||
name: ${{ matrix.os }} / stable | ||
postgres: | ||
build: | ||
context: docker | ||
dockerfile: postgres.Dockerfile | ||
env: | ||
POSTGRES_USER: username | ||
POSTGRES_PASSWORD: password | ||
POSTGRES_HOST: "127.0.0.1" | ||
POSTGRES_DB: "pgboss" | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 127.0.0.1:5444:5432 | ||
command: | ||
- "postgres" | ||
- "-c" | ||
- "config_file=/var/lib/postgresql/postgresql.conf" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -128,7 +178,7 @@ jobs: | |
docker compose -f docker/compose.yaml logs postgres --tail 10 | ||
- name: run e2e tests | ||
env: | ||
POSTGRES_URL: postgres://username:[email protected]:5444/pgboss | ||
POSTGRES_URL: postgres://username:[email protected]:5444/pgboss | ||
run: cargo test --locked --all-features --all-targets --test e2e -- --nocapture | ||
coverage: | ||
# use llvm-cov to build and collect coverage and outputs in a format that | ||
|
@@ -154,6 +204,26 @@ jobs: | |
# for lots of more discussion | ||
runs-on: ubuntu-latest | ||
name: ubuntu / stable / coverage | ||
postgres: | ||
build: | ||
context: docker | ||
dockerfile: postgres.Dockerfile | ||
env: | ||
POSTGRES_USER: username | ||
POSTGRES_PASSWORD: password | ||
POSTGRES_HOST: "127.0.0.1" | ||
POSTGRES_DB: "pgboss" | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 127.0.0.1:5444:5432 | ||
command: | ||
- "postgres" | ||
- "-c" | ||
- "config_file=/var/lib/postgresql/postgresql.conf" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -167,15 +237,9 @@ jobs: | |
- name: cargo generate-lockfile | ||
if: hashFiles('Cargo.lock') == '' | ||
run: cargo generate-lockfile | ||
- name: ensure PostgreSQL service | ||
run: | | ||
docker compose -f docker/compose.yaml up -d --build | ||
docker ps | ||
sleep 10 | ||
docker compose -f docker/compose.yaml logs postgres --tail 10 | ||
- name: cargo llvm-cov | ||
env: | ||
POSTGRES_URL: postgres://username:[email protected]:5444/pgboss | ||
POSTGRES_URL: postgres://username:[email protected]:5444/pgboss | ||
run: cargo llvm-cov --locked --all-features --lcov --output-path lcov.info | ||
- name: Record Rust version | ||
run: echo "RUST=$(rustc --version)" >> "$GITHUB_ENV" | ||
|