fix: ci with sqlx
This commit is contained in:
@@ -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)
|
||||
|
||||
+10
-3
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user