Created
December 1, 2017 02:09
-
-
Save pftg/86eac48de69e926fdd16e5bffe4bee88 to your computer and use it in GitHub Desktop.
Typical pronto setup for Ruby on Rails + GitHub + CircleCI 2.0
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
| # .circleci/config.yml | |
| version: 2 | |
| jobs: | |
| lint: | |
| environment: | |
| - BUNDLE_GEMFILE: Gemfile.tools | |
| docker: | |
| # specify the version you desire here | |
| - image: circleci/ruby:2.4.2-stretch-node-browsers | |
| environment: | |
| RAILS_ENV: test | |
| RACK_ENV: test | |
| working_directory: ~/repo | |
| steps: | |
| - checkout | |
| - restore_cache: | |
| keys: | |
| - v1-tools-dependencies-{{ checksum "Gemfile.tools.lock" }} | |
| # fallback to using the latest cache if no exact match is found | |
| - v1-tools-dependencies- | |
| - run: | |
| name: install cmake | |
| command: | | |
| sudo apt-get install cmake | |
| - run: | |
| name: install dependencies | |
| command: | | |
| bundle check --path vendor/bundle || bundle install --jobs=4 --retry=3 --path vendor/bundle | |
| - save_cache: | |
| paths: | |
| - ./vendor/bundle | |
| key: v1-tools-dependencies-{{ checksum "Gemfile.tools.lock" }} | |
| - run: | |
| name: run source code analysis | |
| command: | | |
| bundle exec pronto run -c origin/master -f github_status -f github_pr_review --exit-code | |
| - store_artifacts: | |
| path: ./tmp | |
| workflows: | |
| version: 2 | |
| release: | |
| jobs: | |
| - lint: | |
| # Run lint after tests | |
| # requires: | |
| # - test |
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
| source 'https://rubygems.org' | |
| git_source(:github) do |repo_name| | |
| repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") | |
| "https://github.com/#{repo_name}.git" | |
| end | |
| gem 'pronto' | |
| gem 'oj' | |
| gem 'pronto-rubocop', require: false | |
| gem 'pronto-scss', require: false | |
| gem 'pronto-eslint', require: false | |
| gem 'pronto-brakeman', require: false | |
| gem 'pronto-rails_best_practices', require: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment