mirror of
https://github.com/Blah-IM/blahrs.git
synced 2025-05-01 00:31:09 +00:00
test,ci: validate version of sqlite and fix ci
This commit is contained in:
parent
4108212f34
commit
7b0ca8aa16
2 changed files with 22 additions and 2 deletions
13
.github/workflows/ci.yaml
vendored
13
.github/workflows/ci.yaml
vendored
|
@ -39,15 +39,20 @@ jobs:
|
||||||
|
|
||||||
test:
|
test:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
rust: [stable, beta]
|
rust: [stable, beta]
|
||||||
name: Test ${{ matrix.rust }}
|
name: Test ${{ matrix.rust }}
|
||||||
runs-on: ubuntu-latest
|
# Need libsqlite3-dev >= 3.38.0 (2022-02-22)
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install sqlite
|
||||||
|
run: sudo apt-get install --no-install-recommends -y libsqlite3-dev
|
||||||
|
|
||||||
- name: Disable high-priority rust-toolchain.toml
|
- name: Disable high-priority rust-toolchain.toml
|
||||||
run: rm rust-toolchain.toml
|
run: rm rust-toolchain.toml
|
||||||
|
|
||||||
|
@ -67,7 +72,11 @@ jobs:
|
||||||
run: cargo build --workspace --all-targets
|
run: cargo build --workspace --all-targets
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: cargo test --workspace --all-targets -- --include-ignored
|
run: cargo test --workspace --all-targets
|
||||||
|
|
||||||
|
# WAIT: Next release of `criterion` for `--include-ignored`.
|
||||||
|
- name: Test ignored
|
||||||
|
run: cargo test --workspace --all-targets -- --ignored
|
||||||
|
|
||||||
nix-flake:
|
nix-flake:
|
||||||
name: Flake package
|
name: Flake package
|
||||||
|
|
|
@ -131,4 +131,15 @@ impl ConnectionExt for Connection {}
|
||||||
fn init_sql_valid() {
|
fn init_sql_valid() {
|
||||||
let conn = Connection::open_in_memory().unwrap();
|
let conn = Connection::open_in_memory().unwrap();
|
||||||
conn.execute_batch(INIT_SQL).unwrap();
|
conn.execute_batch(INIT_SQL).unwrap();
|
||||||
|
|
||||||
|
// Instantiate view to check syntax and availability of `unixepoch()`.
|
||||||
|
// It requires sqlite >= 3.38.0 (2022-02-22) which is not available by default on GitHub CI.
|
||||||
|
let ret = conn
|
||||||
|
.query_row(
|
||||||
|
"SELECT COUNT(*) FROM `valid_user_act_key`",
|
||||||
|
params![],
|
||||||
|
|row| row.get::<_, i64>(0),
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
|
assert_eq!(ret, 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue