I'm new to Gitlab CI and I'm trying to automatically test my application on commits.
I don't know how this works, I know it uses a docker image and it runs the commands you want.
I picked the node:8 image to start (I am doing an electron project, maybe there is a better image for this)
The thing is, that if I run the command "npm test" on my computer, it runs well and all test pass, but it isn't working on the gitlab ci jobs and I don't know why.
Im developing this on windows, and the docker image uses linux, that could be a problem?
The error always happens with the ChromeDriver. I looked up the folder, and I saw that only had an exe, so I downloaded the linux distribution of the driver and inserted it there. I also execute the driver before running the test (in my computer this isn't needed, it does automatically), and still get the same error.
I'm pretty lost. Any alternative for this to work? Maybe another docker image?
My gitlab-ci.yml:
variables:
VERSION_ID: '1.0.$CI_PIPELINE_ID'
stages:
- build
build:
image: node:8
stage: build
artifacts:
paths:
- $CI_PROJECT_DIR/dist/*.*
script:
- apt-get update
- apt-get -y install libnss3-dev
- npm install
- chmod 0777 ./node_modules/.bin/mocha
- chmod 0777 ./node_modules/electron-chromedriver/bin/chromedriver
- ./node_modules/electron-chromedriver/bin/chromedriver&
- npm test

