From 69cd5e4edac9caac2bb06ef1b38f2a36125c187a Mon Sep 17 00:00:00 2001 From: Volker Schukai <volker.schukai@schukai.com> Date: Mon, 13 May 2024 00:12:49 +0200 Subject: [PATCH] fix: wip new pipeline --- nix/scripts/run-ci-tests.nix | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/nix/scripts/run-ci-tests.nix b/nix/scripts/run-ci-tests.nix index dae0adf23..9b11af361 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 -- GitLab