mirror of
https://github.com/lovasoa/whitebophir
synced 2024-11-10 06:24:17 +00:00
Fix CI
This commit is contained in:
parent
e2ebb3e6f5
commit
189ebbed80
4 changed files with 49 additions and 32 deletions
12
.github/workflows/CI.yml
vendored
12
.github/workflows/CI.yml
vendored
|
@ -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
.github/workflows/nightwatch.json
vendored
23
.github/workflows/nightwatch.json
vendored
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"src_folders": ["tests"],
|
||||
"webdriver": {
|
||||
"start_process": true,
|
||||
"server_path": "node_modules/.bin/chromedriver",
|
||||
"port": 9515
|
||||
},
|
||||
"test_settings": {
|
||||
"default": {
|
||||
"desiredCapabilities": {
|
||||
"browserName": "chrome",
|
||||
"javascriptEnabled": true,
|
||||
"acceptSslCerts": true,
|
||||
"chromeOptions": {
|
||||
"prefs": {
|
||||
"intl.accept_languages": "en-US,en"
|
||||
},
|
||||
"args": ["--headless"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -26,4 +26,3 @@ wbo-backup.zip
|
|||
|
||||
# Nightwatch test results
|
||||
tests_output/
|
||||
nightwatch.conf.js
|
45
nightwatch.conf.js
Normal file
45
nightwatch.conf.js
Normal file
|
@ -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) { }
|
||||
}
|
Loading…
Reference in a new issue