Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lovasoa committed Apr 27, 2020
1 parent e2ebb3e commit 189ebbe
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 32 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,15 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: nanasess/setup-chromedriver@master
with:
chromedriver-version: '79.0.3945.36'
- run: |
export DISPLAY=:99
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
cp .github/workflows/nightwatch.json .
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: |
export DISPLAY=:99
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
- run: npm ci
- run: npm run build --if-present
- run: npm test
- run: npx nightwatch tests --verbose
env:
CI: true
23 changes: 0 additions & 23 deletions .github/workflows/nightwatch.json

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ wbo-backup.zip

# Nightwatch test results
tests_output/
nightwatch.conf.js
45 changes: 45 additions & 0 deletions nightwatch.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Autogenerated by Nightwatch
// Refer to the online docs for more details: https://nightwatchjs.org/gettingstarted/configuration/
const Services = {}; loadServices();

module.exports = {
"src_folders": ["tests"],

"webdriver": {
"start_process": true,
"server_path": "./node_modules/.bin/geckodriver",
"cli_args": [
"--log", "debug"
],
"port": 4444
},

"test_settings": {
"default": {
"desiredCapabilities": {
"browserName": "firefox",
"acceptInsecureCerts": true,
"alwaysMatch": {
"moz:firefoxOptions": {
"args": ["-headless"]
}
}

}
}
}
};

function loadServices() {
try {
Services.seleniumServer = require('selenium-server');
} catch (err) { }

try {
Services.chromedriver = require('chromedriver');
} catch (err) { }

try {
Services.geckodriver = require('geckodriver');
} catch (err) { }
}

0 comments on commit 189ebbe

Please sign in to comment.