Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
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);
};
2 changes: 1 addition & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const getBaseUrl = function(uri) {

const requestXml = function(uri) {
return new Promise((resolve, reject) => {
request(uri, (error, response, body) => {
request.get(uri, (error, response, body) => {
if (!error && response.statusCode == 200) {
resolve({xml: body, headers: response.headers});
}
Expand Down
Loading