Skip to content

Commit

Permalink
try to fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
kayhhh committed Dec 21, 2023
1 parent e42c2e4 commit 994d8d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion dwn-server/tests/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ use sqlx::mysql::MySqlPoolOptions;

#[tokio::test]
async fn insert_record() {
dotenv::dotenv().ok();
let existing = std::env::var("DATABASE_URL").is_ok();
if !existing {
dotenv::dotenv().ok();
}

let db_url = std::env::var("DATABASE_URL").expect("DATABASE_URL must be set");

Expand Down
3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@

devShells.default = pkgs.mkShell {
buildInputs = with pkgs;
[ cargo-watch rust-analyzer rustBin mariadb ] ++ build_inputs;
[ cargo-watch mariadb rust-analyzer rustBin sqlx-cli ]
++ build_inputs;
nativeBuildInputs = native_build_inputs;

LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath build_inputs;
Expand Down

0 comments on commit 994d8d6

Please sign in to comment.