Created
July 21, 2017 07:25
-
-
Save vidyuthd/5aaf37693cdaa3787749b661d6b6915c to your computer and use it in GitHub Desktop.
Gitlab ci yml for chrome
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
image: "ruby:2.3" | |
services: | |
- postgres:latest | |
variables: | |
POSTGRES_DB: test_db | |
POSTGRES_USER: runner | |
POSTGRES_PASSWORD: "" | |
before_script: | |
- apt-get update -qq && apt-get install -y -qq postgresql postgresql-contrib libpq-dev cmake | |
- apt-get install -y wget git unzip xvfb | |
- curl -sS -L https://dl.google.com/linux/linux_signing_key.pub | apt-key add - | |
- echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list | |
- apt-get update -q && apt-get install -y google-chrome-stable && apt-get clean | |
- wget -q https://chromedriver.storage.googleapis.com/$(wget -q -O - https://chromedriver.storage.googleapis.com/LATEST_RELEASE)/chromedriver_linux64.zip | |
- unzip chromedriver_linux64.zip -d /usr/local/bin | |
- apt-get -y install xvfb gtk2-engines-pixbuf | |
- apt-get -y install xfonts-cyrillic xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable | |
- Xvfb -ac :99 -screen 0 1280x1024x16 & | |
- export DISPLAY=:99 | |
- ruby -v | |
- which ruby | |
- gem install bundler --no-ri --no-rdoc | |
- RAILS_ENV=test bundle install --jobs $(nproc) "${FLAGS[@]}" | |
- cp config/database.yml.gitlab config/database.yml | |
- RAILS_ENV=test bundle exec rake db:create db:schema:load | |
rspec: | |
script: | |
- RAILS_ENV=test bundle exec rspec | |
heroku_dev_deploy: | |
type: deploy | |
script: | |
- gem install dpl | |
- dpl --provider=heroku --api-key=$HEROKU_API_KEY --app=$HEROKU_DEV_APP | |
only: | |
- develop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment