ruby Ruby on Rails + GitHub + CircleCI 2.0的典型代码设置
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ruby Ruby on Rails + GitHub + CircleCI 2.0的典型代码设置相关的知识,希望对你有一定的参考价值。
# .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
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
以上是关于ruby Ruby on Rails + GitHub + CircleCI 2.0的典型代码设置的主要内容,如果未能解决你的问题,请参考以下文章
ruby Ruby on Rails:常见路由
ruby Ruby on rails类
markdown [rails:devise] Ruby on Rails的身份验证gem。 #ruby #rails
Ruby on Rails入门篇
ruby Ruby on Rails是左外连接
ruby Ruby on Rails中的分叉进程