From f812aa40d7b27cd67a193a6053c325382c236f8a Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 2 May 2024 16:59:15 +0200 Subject: [PATCH] testing... --- .github/workflows/ci.yml | 44 ++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4db767e2b5e..94c28f47724 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,7 @@ on: branches: - main - master + - pg-dump-version pull_request: @@ -107,8 +108,8 @@ jobs: backend-test: name: Backend / Test runs-on: ubuntu-22.04 - needs: changed-files - if: needs.changed-files.outputs.non-js == 'true' +# needs: changed-files +# if: needs.changed-files.outputs.non-js == 'true' env: RUST_BACKTRACE: 1 @@ -116,19 +117,19 @@ jobs: 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 @@ -136,9 +137,16 @@ jobs: # 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: cargo build --tests --workspace - - run: cargo test --workspace + - run: sudo systemctl start postgresql.service + - run: sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'postgres'" + - run: psql postgres://postgres:password@localhost/cargo_registry -c "select now()" +# - 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 --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