diff --git a/.github/workflows/daily-project-check.yml b/.github/workflows/daily-project-check.yml index 3504fc9..d547f3c 100644 --- a/.github/workflows/daily-project-check.yml +++ b/.github/workflows/daily-project-check.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: node-version: [14.x] - os: [ubuntu-latest, windows-latest, macOS-latest] + os: [ubuntu-latest] steps: - uses: actions/checkout@v1 @@ -25,7 +25,7 @@ jobs: run: | npm i npm run build - npm run test + npm run test:github npm run lint env: CI: true diff --git a/.github/workflows/project-check.yml b/.github/workflows/project-check.yml index 07c32e0..fce2f6a 100644 --- a/.github/workflows/project-check.yml +++ b/.github/workflows/project-check.yml @@ -28,7 +28,7 @@ jobs: run: | npm i npm run build - npm run test + npm run test:github npm run lint env: CI: true diff --git a/package.json b/package.json index a51790e..1eb159d 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,8 @@ "ng": "ng", "start": "ng serve", "build": "ng build", - "test": "ng test --watch=false", + "test": "ng test", + "test:github": "ng test --karma-config=projects/coreui/icons-angular/karma.conf.github.js", "lint": "ng lint", "link-lib": "cd dist/coreui-icons-angular/ && npm link", "publish-lib": "cd dist/coreui-icons-angular/ && npm publish --tag next --dry-run", diff --git a/projects/coreui/icons-angular/karma.conf.github.js b/projects/coreui/icons-angular/karma.conf.github.js new file mode 100644 index 0000000..5d3bd2e --- /dev/null +++ b/projects/coreui/icons-angular/karma.conf.github.js @@ -0,0 +1,32 @@ +// Karma configuration file, see link for more information +// https://karma-runner.github.io/1.0/config/configuration-file.html + +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-istanbul-reporter'), + require('@angular-devkit/build-angular/plugins/karma') + ], + client: { + clearContext: false // leave Jasmine Spec Runner output visible in browser + }, + coverageIstanbulReporter: { + dir: require('path').join(__dirname, '../../../coverage/coreui/icons-angular'), + reports: ['html', 'lcovonly', 'text-summary'], + fixWebpackSourcePaths: true + }, + reporters: ['progress', 'kjhtml'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: false, + singleRun: true, + restartOnFileChange: false, + browsers: ['ChromeHeadless'], + }); +};