1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Switch from Travis to Circle CI (#2100)

This commit is contained in:
Matt Brictson 2022-01-09 11:21:33 -08:00 committed by GitHub
parent 9b32298c4e
commit 5fe49bd6ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 125 additions and 39 deletions

113
.circleci/config.yml Normal file
View file

@ -0,0 +1,113 @@
version: 2.1
executors:
ruby:
parameters:
version:
description: "Ruby version number"
default: "3.1"
type: string
docker:
- image: ruby:<< parameters.version >>
commands:
bundle_install:
description: Install Ruby dependencies with Bundler
parameters:
version:
description: "Ruby version number"
default: "3.1"
type: string
steps:
- restore_cache:
keys:
- bundle-v1-{{ arch }}-<< parameters.version >>
- run:
name: Install Ruby Dependencies
command: |
gem install bundler --conservative --no-document || gem install bundler -v '< 2' --no-document
bundle config --local path vendor/bundle
bundle check || (bundle install --jobs=4 --retry=3 && bundle clean)
- save_cache:
paths:
- ./vendor/bundle
key: bundle-v1-{{ arch }}-<< parameters.version >>-{{ checksum "Gemfile.lock" }}
jobs:
danger:
executor: ruby
steps:
- checkout
- bundle_install
- run: bundle exec danger
rubocop:
executor: ruby
steps:
- checkout
- bundle_install
- run: bundle exec rubocop
spec:
parameters:
version:
description: "Ruby version number"
default: "3.1"
type: string
executor:
name: ruby
version: << parameters.version >>
steps:
- checkout
- bundle_install:
version: << parameters.version >>
- run: bundle exec rake spec
workflows:
version: 2
commit-workflow:
jobs:
- danger
- rubocop
- spec:
matrix:
parameters:
version:
[
"2.0",
"2.1",
"2.2",
"2.3",
"2.4",
"2.5",
"2.6",
"2.7",
"3.0",
"3.1",
]
cron-workflow:
jobs:
- rubocop
- spec:
matrix:
parameters:
version:
[
"2.0",
"2.1",
"2.2",
"2.3",
"2.4",
"2.5",
"2.6",
"2.7",
"3.0",
"3.1",
]
triggers:
- schedule:
cron: "0 13 * * 6"
filters:
branches:
only:
- master

View file

@ -1,30 +0,0 @@
language: ruby
rvm:
- 3.0
- 2.7
- 2.6
- 2.5
- 2.4
- 2.3
- 2.2
- 2.1
- 2.0
matrix:
# Rubinius periodically fails in general, and it always segfaults for RuboCop
# in particular. Until we figure out how to make it work consistently, allow
# it to fail without breaking the build.
allow_failures:
- rvm: rbx-2
include:
- rvm: rbx-2
script: bundle exec rake spec
# Run Danger only once, on 2.5
- rvm: 2.5
before_script: bundle exec danger
script: bundle exec rake spec rubocop
install: bundle install --jobs=1
cache: bundler
branches:
only:
- master

View file

@ -53,7 +53,7 @@ $ bundle exec rake features KEEP_RUNNING=1
### Report failing Cucumber features!
Currently, the Capistrano Travis build does *not* run the Cucumber suite. This means it is possible for a failing Cucumber feature to sneak in without being noticed by our continuous integration checks.
Currently, the Capistrano CI build does *not* run the Cucumber suite. This means it is possible for a failing Cucumber feature to sneak in without being noticed by our continuous integration checks.
**If you come across a failing Cucumber feature, this is a bug.** Please report it by opening a GitHub issue. Or even better: do your best to fix the feature and submit a pull request!
@ -63,7 +63,7 @@ This project uses [RuboCop](https://github.com/bbatsov/rubocop) to enforce stand
* Test that your contributions pass with `rake rubocop`
* Rubocop is also run as part of the full test suite with `rake`
* Note the Travis build will fail and your PR cannot be merged if Rubocop finds errors
* Note the CI build will fail and your PR cannot be merged if Rubocop finds errors
## Submitting a pull request

View file

@ -1,7 +1,7 @@
# Capistrano: A deployment automation tool built on Ruby, Rake, and SSH.
[![Gem Version](https://badge.fury.io/rb/capistrano.svg)](http://badge.fury.io/rb/capistrano) [![Build Status](https://travis-ci.org/capistrano/capistrano.svg?branch=master)](https://travis-ci.org/capistrano/capistrano) [![Code Climate](https://codeclimate.com/github/capistrano/capistrano/badges/gpa.svg)](https://codeclimate.com/github/capistrano/capistrano) [![CodersClan](https://img.shields.io/badge/get-support-blue.svg)](http://codersclan.net/?repo_id=325&source=small)
[![Gem Version](https://badge.fury.io/rb/capistrano.svg)](http://badge.fury.io/rb/capistrano) [![Build Status](https://circleci.com/gh/capistrano/capistrano/tree/master.svg?style=shield)](https://app.circleci.com/pipelines/github/capistrano/capistrano?branch=master) [![Code Climate](https://codeclimate.com/github/capistrano/capistrano/badges/gpa.svg)](https://codeclimate.com/github/capistrano/capistrano) [![CodersClan](https://img.shields.io/badge/get-support-blue.svg)](http://codersclan.net/?repo_id=325&source=small)
Capistrano is a framework for building automated deployment scripts. Although Capistrano itself is written in Ruby, it can easily be used to deploy projects of any language or framework, be it Rails, Java, or PHP.

View file

@ -1,15 +1,18 @@
require "bundler/gem_tasks"
require "cucumber/rake/task"
require "rspec/core/rake_task"
begin
require "rubocop/rake_task"
task default: %i(spec rubocop)
RSpec::Core::RakeTask.new
Cucumber::Rake::Task.new(:features)
desc "Run RuboCop checks"
RuboCop::RakeTask.new
task default: %i(spec rubocop)
rescue LoadError
task default: :spec
end
RSpec::Core::RakeTask.new
Cucumber::Rake::Task.new(:features)
Rake::Task["release"].enhance do
puts "Don't forget to publish the release on GitHub!"