Skip to content

Commit

Permalink
test: Fix test coverage for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzahamidi committed Aug 27, 2022
1 parent 8e13988 commit c602a0a
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 164 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ jobs:
- name: Build libs and demo
run: npm run build:demo
- name: Test libs
run: |
npm run test:core -- --browsers=ChromeHeadlessNoSandbox --codeCoverage=true --watch=false
npm run test:bs3 -- --browsers=ChromeHeadlessNoSandbox --codeCoverage=true --watch=false
npm run test:bs4 -- --browsers=ChromeHeadlessNoSandbox --codeCoverage=true --watch=false
npm run test:material -- --browsers=ChromeHeadlessNoSandbox --codeCoverage=true --watch=false
run: npm run test:coverage:ci
- name: Publish code coverage
run: npm run publish:coverage
2 changes: 1 addition & 1 deletion demo/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = function (config) {
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome', 'ChromeHeadlessNoSandbox'],
browsers: ['Chrome', 'ChromeHeadless'],
singleRun: false,
customLaunchers: {
ChromeHeadlessNoSandbox: {
Expand Down
239 changes: 93 additions & 146 deletions package-lock.json

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"test:bs3": "ng test @ajsf/bootstrap3",
"test:bs4": "ng test @ajsf/bootstrap4",
"test:material": "ng test @ajsf/material",
"test:coverage:ci": "ng test --code-coverage --no-watch --no-progress --browsers=ChromeHeadless",
"publish:coverage": "./node_modules/.bin/codecov",
"lint": "ng lint",
"e2e": "ng e2e"
Expand Down Expand Up @@ -107,19 +108,17 @@
"@angular/cli": "^14.2.1",
"@angular/compiler-cli": "^14.2.0",
"@angular/language-service": "^14.2.0",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.6",
"@types/jasmine": "~4.0.0",
"@types/lodash": "^4.14.182",
"@types/node": "^12.11.1",
"codecov": "^3.8.3",
"codelyzer": "^6.0.0",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~7.0.0",
"karma": "~6.3.17",
"karma-chrome-launcher": "~3.1.1",
"jasmine-core": "~4.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma": "~6.4.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~4.0.2",
"karma-jasmine-html-reporter": "^1.5.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"ng-packagr": "^14.1.0",
"protractor": "~7.0.0",
"ts-node": "~8.6.2",
Expand Down
2 changes: 1 addition & 1 deletion projects/ajsf-bootstrap3/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module.exports = function (config) {
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
browsers: ['Chrome', 'ChromeHeadlessNoSandbox'],
browsers: ['Chrome', 'ChromeHeadless'],
singleRun: false,
customLaunchers: {
ChromeHeadlessNoSandbox: {
Expand Down
2 changes: 1 addition & 1 deletion projects/ajsf-bootstrap4/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module.exports = function (config) {
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
browsers: ['Chrome', 'ChromeHeadlessNoSandbox'],
browsers: ['Chrome', 'ChromeHeadless'],
singleRun: false,
customLaunchers: {
ChromeHeadlessNoSandbox: {
Expand Down
2 changes: 1 addition & 1 deletion projects/ajsf-core/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = function (config) {
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome', 'ChromeHeadlessNoSandbox'],
browsers: ['Chrome', 'ChromeHeadless'],
singleRun: false,
customLaunchers: {
ChromeHeadlessNoSandbox: {
Expand Down
2 changes: 1 addition & 1 deletion projects/ajsf-material/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = function (config) {
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome', 'ChromeHeadlessNoSandbox'],
browsers: ['Chrome', 'ChromeHeadless'],
singleRun: false,
customLaunchers: {
ChromeHeadlessNoSandbox: {
Expand Down

0 comments on commit c602a0a

Please sign in to comment.