Last active
June 26, 2019 03:27
-
-
Save adesurirey/7c013bfa1a9bed9d56ffea54db5d6288 to your computer and use it in GitHub Desktop.
Wercker setup for Rails 5.x with Webpack (tests + system tests + rubocop + eslint + stylelint)
This file contains 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: ruby:2.5.0 | |
# http://devcenter.wercker.com/docs/services/index.html | |
services: | |
- redis | |
- id: postgres | |
env: | |
POSTGRES_PASSWORD: ourlittlesecret | |
POSTGRES_USER: testuser | |
build: | |
# http://devcenter.wercker.com/docs/steps/index.html | |
steps: | |
- rails-database-yml | |
- script: | |
name: nokogiri tricks | |
code: bundle config build.nokogiri --use-system-libraries | |
- bundle-install: | |
without: development | |
- bigtruedata/install-node@2.1.1: | |
version: 9.7.1 | |
- akupila/yarn@0.2.0 | |
- script: | |
name: yarn install | |
code: yarn install | |
- script: | |
name: install chrome headless | |
code: | | |
apt-get update -y | |
apt-get install -y ca-certificates apt-transport-https ttf-wqy-zenhei fonts-unfonts-core | |
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - | |
echo "deb https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list | |
apt-get update -y | |
apt-get install -y google-chrome-stable | |
- script: | |
name: set chrome headless | |
code: | | |
export CHROME_BIN=/usr/bin/google-chrome-stable | |
- script: | |
name: load db schema | |
code: RAILS_ENV=test bundle exec rake db:schema:load | |
- script: | |
name: prepare tests | |
code: RAILS_ENV=test bundle exec rake db:test:prepare | |
- script: | |
name: test | |
code: RAILS_ENV=test bundle exec rake test | |
- script: | |
name: test system | |
code: RAILS_ENV=test bundle exec rake test:system | |
- script: | |
name: rubocop | |
code: bundle exec rubocop | |
- script: | |
name: eslint | |
code: ./node_modules/.bin/eslint frontend/ --ext js,jsx | |
- script: | |
name: stylelint | |
code: ./node_modules/.bin/stylelint "app/assets/stylesheets/**/*.scss frontend/**/*.scss" |
Author
adesurirey
commented
Mar 12, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment