mirror of
https://github.com/darkwire/darkwire.io.git
synced 2025-07-24 21:13:18 +00:00
Nightwatch uses Selenium, so we can run tests in real browsers. This makes it easier to test features that use the web cryptography API.
26 lines
1.0 KiB
YAML
26 lines
1.0 KiB
YAML
language: node_js
|
|
node_js:
|
|
- 5.2.0
|
|
sudo: required
|
|
cache:
|
|
directories:
|
|
- node_modules
|
|
before_install:
|
|
- sudo apt-get update
|
|
- sudo apt-get install -y libappindicator1 fonts-liberation
|
|
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
|
- sudo dpkg -i google-chrome*.deb
|
|
- wget http://chromedriver.storage.googleapis.com/2.21/chromedriver_linux64.zip
|
|
- unzip chromedriver_linux64
|
|
- sudo mv chromedriver /usr/bin
|
|
before_script:
|
|
- export CHROME_BIN=/usr/bin/google-chrome
|
|
- "export DISPLAY=:99.0"
|
|
- "sh -e /etc/init.d/xvfb start"
|
|
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"
|
|
- sleep 5 # give xvfb some time to start
|
|
- gulp bundle
|
|
- node index.js &
|
|
- sleep 5
|
|
script: node_modules/mocha/bin/mocha test/unit --compilers js:babel-core/register && node_modules/nightwatch/bin/nightwatch --test test/acceptance/index.js --config test/acceptance/nightwatch.json -e chrome
|