My CI runner will only run a single line. I'm trying to run npm install
prior to eslint
. However, if I add npm install
to the before_script
section, then only npm install
runs and the build reports success without ever actually running eslint
. Are multiple commands not supported on a windows shell runner?
I also tried moving npm install
into the lint
job, with the same result. The only way I was able to get this to work is by putting both commands into one line as npm install&&eslint **/*.js
I have installed the gitlab multi-runner on a windows host. Here is my .gitlab-ci.yml
before_script:
- npm install
stages:
- test
cache:
key: "$CI_BUILD_REF_NAME"
paths:
- node_modules/
lint:
stage: test
tags:
- javascript
script:
- eslint **/*.js
before_script:
- npm install
stages:
-
test
- deploy
cache:
key: "$CI_BUILD_REF_NAME"
paths:
- node_modules/
mocha:
stage: test
tags:
- javascript
script:
- set NODE_ENV=test
- mocha ./tests/**/*.js
lint:
stage: test
tags:
- javascript
script:
- eslint */**
apidoc:
stage: deploy
tags:
- javascript
script:
- apidoc -e node_modules -o c:\docs\api\
Running with gitlab-ci-multi-runner 1.4.2 (bcc1794)
Using Shell executor...
Running on US2976NB...
Fetching changes...
Removing node_modules/
HEAD is now at 800016a Fix eslint glob
From http://redacted
5030d8a..c66df4a feature/sequelize -> origin/feature/sequelize
Checking out 800016ac as feature/ci...
Checking cache for feature/ci...
$ npm install
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
Creating cache feature/ci...
node_modules/: found 13865 matching files
Build succeeded
concurrent = 1
check_interval = 0
[[runners]]
name = "redacted"
url = "redacted"
token = "redacted"
executor = "shell"
tags = ["javascript"]
[runners.ssh]
[runners.docker]
tls_verify = false
image = ""
privileged = false
disable_cache = false
[runners.parallels]
base_name = ""
disable_snapshots = false
[runners.virtualbox]
base_name = ""
disable_snapshots = false
[runners.cache]
Insecure = false