diff --git a/nix/scripts/run-ci-tests.nix b/nix/scripts/run-ci-tests.nix index dae0adf231b12c18a307e097bd05595b4280d14a..9b11af361962828d53fba5cad62a980872b9b6f5 100644 --- a/nix/scripts/run-ci-tests.nix +++ b/nix/scripts/run-ci-tests.nix @@ -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