Skip to content

Commit

Permalink
testing...
Browse files Browse the repository at this point in the history
  • Loading branch information
Turbo87 committed May 2, 2024
1 parent 65c25ea commit 676956a
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- master
- pg-dump-version

pull_request:

Expand All @@ -20,7 +21,6 @@ env:
GRCOV_VERSION: 0.8.19
# renovate: datasource=npm depName=pnpm
PNPM_VERSION: 9.0.6
# renovate: datasource=docker depName=postgres
POSTGRES_VERSION: 13

jobs:
Expand Down Expand Up @@ -112,33 +112,37 @@ jobs:

env:
RUST_BACKTRACE: 1
TEST_DATABASE_URL: postgres://postgres:postgres@localhost/postgres
TEST_DATABASE_URL: postgres://myuser:mypassword@localhost/mydatabase
RUSTFLAGS: "-D warnings -Cinstrument-coverage"
MALLOC_CONF: "background_thread:true,abort_conf:true,abort:true,junk:true"

services:
postgres:
image: postgres:13@sha256:eee22204934b36935237e7c92355e3178cfdf3c5377dec9c19c848115cc4637b
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
# services:
# postgres:
# image: postgres:13@sha256:eee22204934b36935237e7c92355e3178cfdf3c5377dec9c19c848115cc4637b
# 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@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3

# Update `pg_dump` to the same version as the running PostgreSQL server
- run: sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -v ${{ env.POSTGRES_VERSION }} -i -p
- run: sudo systemctl start postgresql.service
- run: |
createuser myuser --username=postgres
createdb --owner myuser mydatabase --username=postgres
psql -c "ALTER USER myuser WITH PASSWORD 'mypassword'" --username=postgres
- run: cargo build --tests --workspace
- run: cargo test --workspace
- run: cargo test --package crates_io_worker

- run: curl -sL https://github.com/mozilla/grcov/releases/download/v${{ env.GRCOV_VERSION }}/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar xjf -
- run: rustup component add llvm-tools
Expand Down

0 comments on commit 676956a

Please sign in to comment.