Skip to content

Commit

Permalink
Add a GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
poirotp-bpk committed Oct 9, 2023
1 parent dce70b6 commit d997768
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: DASH Validator tests
on: [ push ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 'lts/*' ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: browser-actions/setup-chrome@v1
id: setup-chrome
- run: export CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}
- run: npm install
- run: npm test
7 changes: 7 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ module.exports = function (config) {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
},
Chrome_github_ci: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
},
coverageReporter: {
Expand All @@ -54,5 +58,8 @@ module.exports = function (config) {
if (process.env.TRAVIS) {
configuration.browsers = ['Chrome_travis_ci'];
}
if (process.env.GITHUB_ACTION) {
configuration.browsers = ['Chrome_github_ci'];
}
config.set(configuration);
};

0 comments on commit d997768

Please sign in to comment.