I’m trying to make a pipeline with gitlab runner on windows- My pipeline works fine with gitlab page , but when I push it to gitlab runner the test jobs fail. Here I leave the configuration of my yaml and the repo that is also published
image: node:14.17.0
stages:
- install
- test
- build
- deploy
install-dependencies:
stage: install
script:
- npm install
artifacts:
expire_in: 1hr
paths:
- node_modules/
cache:
paths:
- node_modules/
test-apps:
stage: test
variables:
CHROME_BIN: google-chrome
dependencies:
- install-dependencies
script:
- npm run test:ci
build-app:
stage: build
variables:
BUILD_CONFIGURATION: 'production'
dependencies:
- install-dependencies
script:
- npm run build
artifacts:
expire_in: 1hr
paths:
- dist/
this is the error that gives me in the jobs
this is my karma.config.json
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
jasmine: {
},
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, './coverage/gitlab-devops-angular'),
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
// browsers: ['Chrome'],
browsers: ['ChromeHeadlessCI'],
customLaunchers: {
ChromeHeadlessCI: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
},
singleRun: false,
restartOnFileChange: true
});
};
When i run the test in local machine , work
thanks