Created
April 11, 2016 21:46
-
-
Save davidtorroija/23d33bbf8f17a09d872291b240fb84a2 to your computer and use it in GitHub Desktop.
Wercker CI config file to run in a Node Box: nightwatch with mocha, firefox and a custom nightwatch.json that differs from the dev file, also installs java to run selenium
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
box: node | |
build: | |
steps: | |
- script: | |
name: setup | |
code: | | |
sudo apt-get update -y -qq | |
- install-packages: | |
packages: ruby ruby-dev bzr mercurial git wget | |
- script: | |
name: install firefox | |
code: |- | |
# sudo apt-get install --assume-yes build-essential curl wget libfreetype6-dev libfontconfig1-dev xvfb x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic x11-apps | |
cd /usr/local | |
wget http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/45.0/linux-x86_64/en-US/firefox-45.0.tar.bz2 | |
tar xvjf firefox-45.0.tar.bz2 | |
sudo ln -s /usr/local/firefox/firefox /usr/bin/firefox | |
- script: | |
name: install java | |
code: |- | |
sudo apt-get --assume-yes install default-jre | |
# sudo apt-get --assume-yes install default-jdk | |
- script: | |
name: test java | |
code: |- | |
type java || { echo "I expected java to be available after oracle-java7-installer installation. Aborting."; exit 1; } | |
- script: | |
name: start virtual display xvfb | |
code: |- | |
sudo apt-get --assume-yes install xvfb -y | |
sleep 15 | |
export DISPLAY=:99.0 | |
sudo start-stop-daemon --start --quiet --pidfile /tmp/xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1024x768x24 -ac +extension GLX +render -noreset | |
sleep 15 | |
xdpyinfo -display :0 >/dev/null 2>&1 && echo "In use" || echo "Free" | |
- npm-install | |
- script: | |
name: set NODE_ENV == testing | |
code: |- | |
export NODE_ENV=testing | |
- script: | |
name: install nightwatch global | |
code: |- | |
npm install -g nightwatch | |
- script: | |
name: run nightwatch with ci config | |
code: |- | |
nightwatch --config ./nightwatch-ci.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you also share the nightwatch-ci.json ?