Skip to content

Commit

Permalink
Migrate from CircleCI to GitHub Actions; add Cucumber features to CI (#…
Browse files Browse the repository at this point in the history
…2132)

* Use ubuntu-20.04 for old versions of Ruby
* Add API token needed by Danger
* Remove CircleCI
* Switch README badge from CircleCI to GitHub Actions
* Cucumber features now run in CI!
* Aggregate both spec matrices into a single pass/fail job
  • Loading branch information
mattbrictson committed May 27, 2023
1 parent 0af1336 commit 31e142d
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 140 deletions.
133 changes: 0 additions & 133 deletions .circleci/config.yml

This file was deleted.

88 changes: 88 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: CI
on:
push:
branches: [master]
pull_request:
jobs:
spec:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ["2.3", "2.4", "2.5", "2.6", "2.7", "3.0", "3.1", "3.2", "head"]
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: rake spec
run: bundle exec rake spec
spec-legacy:
runs-on: ubuntu-20.04
strategy:
matrix:
ruby: ["2.0", "2.1", "2.2"]
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: rake spec
run: bundle exec rake spec
spec-all:
runs-on: ubuntu-latest
needs: [spec, spec-legacy]
if: always()
steps:
- name: All tests ok
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Some tests failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "ruby" # latest-stable
bundler-cache: true
- name: rake rubocop
run: bundle exec rake rubocop
danger:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "ruby" # latest-stable
bundler-cache: true
- name: danger
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
run: bundle exec danger
features:
needs: [spec, spec-legacy]
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Cache Vagrant boxes
uses: actions/cache@v3
with:
path: ~/.vagrant.d/boxes
key: ${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }}
restore-keys: |
${{ runner.os }}-vagrant-
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "ruby" # latest-stable
bundler-cache: true
- name: rake features
run: bundle exec rake features
6 changes: 0 additions & 6 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ $ bundle exec rake features
$ bundle exec rake features KEEP_RUNNING=1
```

### Report failing Cucumber features!

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!

## Coding guidelines

This project uses [RuboCop](https://github.com/bbatsov/rubocop) to enforce standard Ruby coding guidelines.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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://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)
[![Gem Version](https://badge.fury.io/rb/capistrano.svg)](http://badge.fury.io/rb/capistrano) [![Build Status](https://github.com/capistrano/capistrano/actions/workflows/ci.yml/badge.svg)](https://github.com/capistrano/capistrano/actions/workflows/ci.yml) [![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.

Expand Down

0 comments on commit 31e142d

Please sign in to comment.