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]