From 3de6b464659599a62e8c329638c7281d786d911d Mon Sep 17 00:00:00 2001 From: Ana Gelez Date: Mon, 10 Aug 2020 11:15:02 +0200 Subject: [PATCH] Start PostgreSQL and set BROWSER for integration tests --- .drone.jsonnet | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 13124374..feaccd87 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -139,19 +139,32 @@ local Unit(db) = cachedPipeline( // PIPELINE 4: runs integration tests // It installs a local instance an run integration test with Python scripts // that use Selenium (located in scripts/browser_test). -local Integration(db) = cachedPipeline( +local Integration(db) = { +} + basePipeline( "integration-" + db, [ - // Install the front-end - "cargo web deploy -p plume-front", - // Install the server - 'cargo install --debug --no-default-features --features="' - + db + '",test --force --path .', - // Install plm - 'cargo install --debug --no-default-features --features="' - + db + '" --force --path plume-cli', - // Run the tests - "./script/run_browser_test.sh" + restoreCache, + startDb(db), + { + name: "integration-" + db, + image: plumeEnv, + environment: { + BROWSER: "firefox", + }, + commands: [ + // Install the front-end + "cargo web deploy -p plume-front", + // Install the server + 'cargo install --debug --no-default-features --features="' + + db + '",test --force --path .', + // Install plm + 'cargo install --debug --no-default-features --features="' + + db + '" --force --path plume-cli', + // Run the tests + "./script/run_browser_test.sh" + ], + }, + saveCache, ] );