Skip to content
Snippets Groups Projects
Select Git revision
  • e2c52562d9442ed379ae7f9949b0e2fb9fc8889a
  • master default protected
  • v1.16.5
  • v1.16.4
  • v1.16.3
  • v1.16.2
  • v1.16.1
  • v1.16.0
  • v1.15.0
  • v1.14.0
  • v1.13.2
  • v1.13.1
  • v1.13.0
  • v1.12.0
  • v1.11.0
  • v1.10.2
  • v1.10.1
  • v1.10.0
  • v1.9.0
  • v1.8.3
  • v1.8.2
  • v1.8.1
22 results

flag.go

Blame
  • run-ci-tests.nix 930 B
    {
      pkgs,
      lib,
      ...
    }: pkgs.writeShellScriptBin "run-ci-tests" ''
        echo "run ci tests"
    
        if [ -z "''${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
        
        set -x
        ${pkgs.coreutils}/bin/printenv
    
        cd ''${CI_PROJECT_DIR} || exit 1
        
        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="''${CI_PROJECT_DIR}/test/cases/"
        
        if ! ${pkgs.corepack}/bin/pnpm install
        then
           echo "Failed to install dependencies"
           exit 1
        fi
    
        if ! ${pkgs.nodePackages.mocha}/bin/mocha --colors --jobs 1 --bail --recursive ''${TEST_CASES_PATH}
        then
           echo "Tests failed, check your JS!"
           exit 1
        fi
    
        echo "Tests passed!"
    
      ''