wercker.yml
box: wercker/ubuntu12.04-webessentials@1.0.4
# Build definition
build:
# The steps that will be executed on build
steps:
- script:
name: Print versions
code: |
sudo npm -v
sudo node -v
- script:
name: Install google chrome stable
code: |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt-get update
sudo apt-get install -y google-chrome-stable
- script:
name: Install grunt and bower globally
code: |
sudo npm install -g grunt-cli
sudo npm install -g bower
- script:
name: Install node modules
code: |
sudo npm install
- script:
name: Install bower components
code: |
bower install
- script:
name: Print list available testem launchers
code: |
grunt testem:launchers
- script:
name: Test
code: |
sudo xvfb-run grunt test --verbose
after-steps:
- script:
name: Send coverage to coveralls
code: |
echo service_name: wercker > .coveralls.yml
echo repo_token: $COVERALLS_TOKEN >> .coveralls.yml
export COVERALLS_SERVICE_NAME=wercker
export COVERALLS_REPO_TOKEN=$COVERALLS_TOKEN
export COVERALLS_GIT_COMMIT=$WERCKER_GIT_COMMIT
export COVERALLS_SERVICE_JOB_ID=$WERCKER_BUILD_ID
export COVERALLS_GIT_BRANCH=$WERCKER_GIT_BRANCH
cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
# Slack integration
# see http://qiita.com/nekogeruge_987/items/f2c9bc1e258128d49373
- wantedly/pretty-slack-notify:
webhook_url: https://hooks.slack.com/services/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
deploy:
steps:
- lukevivier/gh-pages:
token: $GITHUB_TOKEN
basedir: ./dist