Skip to content

Instantly share code, notes, and snippets.

@cored
Created December 11, 2019 21:56
Show Gist options
  • Save cored/fa615c0d00c0e3797d124215dd27c362 to your computer and use it in GitHub Desktop.
Save cored/fa615c0d00c0e3797d124215dd27c362 to your computer and use it in GitHub Desktop.
version: 2
jobs:
build:
parallelism: 4
docker:
- image: circleci/ruby:2.5.3-node-browsers
environment:
MYSQL_PORT: 3306
RACK_ENV: test
REDIS_URL: redis://127.0.0.1:6379
- image: circleci/mysql:5.7
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
- image: circleci/redis:3.2
working_directory: ~/billing
steps:
- checkout
- run:
name: Install system deps
command: |
sudo apt update
sudo apt install -y libsodium-dev
- restore_cache:
keys:
- v1-dependencies-{{ checksum "Gemfile.lock" }}
- v1-dependencies-
- run:
name: install dependencies
command: |
bundle install --jobs=4 --retry=3 --path vendor/bundle
- save_cache:
paths:
- ./vendor/bundle
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
- run: bundle exec rake db:create
- run: bundle exec rake db:schema:load
- run:
name: run spec tests
command: |
bundle exec rake spec
- run:
name: run rubocop tests
command: |
bundle exec rake rubocop
- run:
name: run bundle-audit tests
command: |
bundle exec bundle-audit
- run:
name: report code coverage
command: |
bundle exec codeclimate-test-reporter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment