I have tried to start with Gitlab's CI using their YAML file. My repo houses an angular 2 application that on build needs to run e2e and unit tests, so one of the lines in the script tries to install the dependancy via NPM to provide this functionality but always fails astronomically, below is my YAML script and an example of an error I come across that tends to vary for some unknown reason.
before_script:
- apt-get update -y && apt-get upgrade -y
- apt-get install -y nodejs
- apt-get install -y npm
- npm update npm -g
- npm cache clean
- npm install -g angular-cli
test:
script:
- ng test
- ng e2e
