From a6b9ee5b090de5b8f699db139c61fc4b3ea35940 Mon Sep 17 00:00:00 2001 From: LucasDLTG Date: Thu, 7 May 2026 19:17:01 +0200 Subject: [PATCH] fix: ci with sqlx --- .gitea/workflows/ci.yml | 2 ++ .pre-commit-config.yaml | 13 ++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 7d80762..2141fc8 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -33,6 +33,8 @@ jobs: ${{ runner.os }}-cargo- - name: Run tests + env: + SQLX_OFFLINE: true run: cargo test --workspace --verbose --all - name: Run Clippy (linter) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2c1f7e0..c1513d6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,23 +12,30 @@ repos: - id: clippy name: clippy - entry: cargo clippy -- -D warnings + entry: bash -c 'SQLX_OFFLINE=true cargo clippy -- -D warnings' language: system types: [rust] pass_filenames: false stages: [pre-commit] + - id: sqlx-prepare-check + name: sqlx prepare check + entry: cargo sqlx prepare --check + language: system + pass_filenames: false + stages: [pre-push] + # ─────────────── PRE-PUSH (heavy checks) ─────────────── - id: test name: cargo test - entry: cargo test --all + entry: bash -c 'SQLX_OFFLINE=true cargo test --all' language: system pass_filenames: false stages: [pre-push] - id: build name: cargo build release - entry: cargo build --release + entry: bash -c 'SQLX_OFFLINE=true cargo build --release' language: system pass_filenames: false stages: [pre-push]