Skip to content
Snippets Groups Projects
Verified Commit 69cd5e4e authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix: wip new pipeline

parent 2626cc83
No related branches found
No related tags found
No related merge requests found
......@@ -2,14 +2,10 @@
pkgs,
lib,
...
}: let
ciJobToken = builtins.getEnv "CI_JOB_TOKEN";
ciProjectDir = builtins.getEnv "CI_PROJECT_DIR";
in
pkgs.writeShellScriptBin "run-ci-tests" ''
}: pkgs.writeShellScriptBin "run-ci-tests" ''
echo "run ci tests"
if [ -n "${ciJobToken}" ]; then
if [ -n "''${CI_JOB_TOKEN}" ]; then
echo "You are in a CI environment, this shell is not intended for CI, but for local development"
exit 1
fi
......@@ -17,17 +13,17 @@ in
set -x
${pkgs.coreutils}/bin/printenv
cd ${ciProjectDir} || exit 1
cd ''${CI_PROJECT_DIR} || exit 1
${pkgs.eza}/bin/eza -T
echo "This script will run tests in the project working directory: ${ciProjectDir}"
echo "This script will run tests in the project working directory: ''${CI_PROJECT_DIR}"
echo "The command is executed in the current working directory and not in a nix derivation."
TEST_CASES_PATH="${ciProjectDir}/test/cases/"
TEST_CASES_PATH="''${CI_PROJECT_DIR}/test/cases/"
if ! ${pkgs.nodePackages.mocha}/bin/mocha --colors --jobs 1 --bail --recursive $TEST_CASES_PATH
if ! ${pkgs.nodePackages.mocha}/bin/mocha --colors --jobs 1 --bail --recursive ''${TEST_CASES_PATH}
then
echo "Tests failed, check your JS!"
exit 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment