diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..e524957 --- /dev/null +++ b/.github/workflows/tests.yml @@ -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 diff --git a/.travis.yml b/.travis.yml index 12c4f81..4ecb4e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ sudo: required -dist: trusty +dist: jammy language: node_js node_js: -- '6' +- '18' before_script: - export CHROME_BIN=/usr/bin/google-chrome - export DISPLAY=:99.0 diff --git a/karma.conf.js b/karma.conf.js index 86caf8b..1447175 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -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: { @@ -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); };