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?;