From c9498fb82d889237e8a432bac42d98846def4e30 Mon Sep 17 00:00:00 2001 From: Denis Cornehl Date: Fri, 4 Oct 2024 10:19:36 +0200 Subject: [PATCH] fix sqlx CI job --- .github/workflows/ci.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a374abab..f781e4290 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,9 +39,6 @@ jobs: with: prefix-key: ${{ env.RUST_CACHE_KEY }} - - name: Build - run: cargo build --workspace --locked - - name: Launch postgres run: | cp .env.sample .env @@ -52,12 +49,12 @@ jobs: # Make sure the database is actually working psql "${DOCSRS_DATABASE_URL}" - - name: run database migrations - run: cargo run -- database migrate - - name: install SQLX CLI run: cargo install sqlx-cli --no-default-features --features postgres + - name: run database migrations + run: cargo sqlx migrate run --database-url $DOCSRS_DATABASE_URL + - name: run sqlx prepare --check run: just sqlx-check @@ -99,7 +96,7 @@ jobs: sleep 5 # Make sure the database is actually working psql "${DOCSRS_DATABASE_URL}" - + - name: run workspace tests run: | cargo test --workspace --locked --no-fail-fast