From 34860b7f99d72f22cfa4c4e68364ff39108a7f2a Mon Sep 17 00:00:00 2001 From: Austin Bonander Date: Tue, 5 Mar 2024 18:12:59 -0800 Subject: [PATCH] fix(ci): just cfg-out the whole `tests/sqlite/sqlcipher.rs` --- .github/workflows/sqlx.yml | 5 +---- tests/sqlite/sqlcipher.rs | 3 ++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/sqlx.yml b/.github/workflows/sqlx.yml index 037dd732f..844e2efe2 100644 --- a/.github/workflows/sqlx.yml +++ b/.github/workflows/sqlx.yml @@ -167,9 +167,6 @@ jobs: matrix: runtime: [async-std, tokio] needs: check - env: - # Enable tests with SQLCipher - RUSTFLAGS: --cfg sqlite_test_sqlcipher steps: - uses: actions/checkout@v2 @@ -201,7 +198,7 @@ jobs: env: DATABASE_URL: sqlite:tests/sqlite/sqlite.db SQLX_OFFLINE_DIR: .sqlx - RUSTFLAGS: --cfg sqlite_ipaddr + RUSTFLAGS: --cfg sqlite_ipaddr --cfg sqlite_test_sqlcipher LD_LIBRARY_PATH: /tmp/sqlite3-lib # Remove test artifacts diff --git a/tests/sqlite/sqlcipher.rs b/tests/sqlite/sqlcipher.rs index ddcc2397a..9be0a179b 100644 --- a/tests/sqlite/sqlcipher.rs +++ b/tests/sqlite/sqlcipher.rs @@ -1,3 +1,5 @@ +#![cfg(sqlite_test_sqlcipher)] + use std::str::FromStr; use sqlx::sqlite::SqliteQueryResult; @@ -125,7 +127,6 @@ async fn it_fails_if_password_is_incorrect() -> anyhow::Result<()> { Ok(()) } -#[cfg(sqlite_test_sqlcipher)] #[sqlx_macros::test] async fn it_honors_order_of_encryption_pragmas() -> anyhow::Result<()> { let (url, _dir) = new_db_url().await?;