image: node:9-alpine stages: - test # [Use this step] To define the vrest-ng-cli version to be downloaded variables: vrest_version: '2.1.0' #vrest-ng-cli version to be downloaded npm_config_cache: '$CI_PROJECT_DIR/.npm' # Cache modules in between jobs cache: key: ${CI_COMMIT_REF_SLUG} paths: - .npm - node_modules test: stage: test script: # update the npm to latest version - npm i npm@latest -g # install the project dependencies - npm ci # Start the application server - npm run start & # download the vrest-ng-cli binary if cache doesn't exist - npm install -g vrest-ng-cli@$vrest_version # Execute the vREST NG tests - vrest-ng-cli run --projectdir=./test/ddt-tests --logger=xunit artifacts: when: always paths: - vrest_logs/logs.xml reports: junit: vrest_logs/logs.xml