Skip to content

Commit

Permalink
added headless chrome launcher for ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
troy-prince-lab49 committed Jun 10, 2021
1 parent 666aafb commit c02922e
Show file tree
Hide file tree
Showing 4 changed files with 178 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Lint
run: npm run lint
- name: Test
run: npm run test
run: npm run test:headless
- name: Chromatic
uses: chromaui/action@v1
with:
Expand Down
168 changes: 168 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"chromatic": "npx chromatic --project-token=02c78aa7d86f",
"publish:lib": "npm publish dist/value-flash --access public",
"test": "ng test",
"test:headless": "ng test --watch=false --browsers=ChromeHeadlessCustom",
"lint": "ng lint",
"pack": "cd dist/value-flash && npm pack",
"docs:json": "compodoc -p ./tsconfig.json -e json -d .",
Expand Down Expand Up @@ -70,6 +71,7 @@
"ng-packagr": "^11.0.0",
"prettier": "^2.3.1",
"protractor": "~7.0.0",
"puppeteer": "^10.0.0",
"ts-node": "~8.3.0",
"typescript": "~4.1.5"
},
Expand Down
8 changes: 7 additions & 1 deletion projects/value-flash/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ module.exports = function (config) {
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
restartOnFileChange: true,
customLaunchers: {
ChromeHeadlessCustom: {
base: "ChromeHeadless",
flags: ['--no-sandbox', 'disable-gpu']
}
}
});
};

0 comments on commit c02922e

Please sign in to comment.