summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Herold <opensource@michaeljherold.com>2021-06-27 22:26:11 -0500
committerMichael Herold <opensource@michaeljherold.com>2021-06-27 22:48:03 -0500
commite8819816be56e92e583f09a33e48a39ae51e85fd (patch)
tree11b1b0f3561151dcac07e66f3805d421e2e03c6f
parentda421967765e7766136f2547b4074043f957c297 (diff)
downloadhashie-e8819816be56e92e583f09a33e48a39ae51e85fd.tar.gz
Lint the CI configuration and update badge
Using YAML lists over pseudo-JSON lists makes for easier diffs. Breaking blocks apart with an empty line helps readability. Avoiding strings delimeters when you don't need them helps with readability. The name of the workflow should describe its purpose. Multithreading bundle installs leads to faster builds. And we need to update the badge to our new CI location.
-rw-r--r--.github/workflows/main.yml50
-rw-r--r--README.md2
2 files changed, 33 insertions, 19 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 014f927..3ddc090 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -1,63 +1,77 @@
-name: Ruby
+name: CI
on:
push:
- branches: [ master ]
+ branches:
+ - master
pull_request:
- branches: [ master ]
+ branches:
+ - master
jobs:
danger:
runs-on: ubuntu-latest
- if: github.event_name == 'pull_request'
+ if: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-ruby@v1
with:
- ruby-version: '2.7'
+ ruby-version: 2.7
- uses: MeilCli/danger-action@v5
with:
- plugins_file: 'Gemfile'
- install_path: 'vendor/bundle'
- danger_file: 'Dangerfile'
- danger_id: 'danger-pr'
+ danger_file: Dangerfile
+ danger_id: danger-pr
+ install_path: vendor/bundle
+ plugins_file: Gemfile
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.github_token }}
+
test:
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
- ruby: [2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, head, debug, truffleruby, truffleruby-head]
+ ruby:
+ - 2.7
+ - 2.6
+ - 2.5
+ - 2.4
+ - 2.3
+ - 2.2
+ - 2.1
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
- ruby-version: ${{ matrix.ruby }}
bundler-cache: true
+ ruby-version: ${{ matrix.ruby }}
- name: Install dependencies
- run: bundle install
+ run: bundle install --jobs 4 --retry 3
- name: Run tests
run: bundle exec rake
+
test-jruby:
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
- os: [ubuntu, macos]
- jruby: [jruby, jruby-head]
+ os:
+ - macos
+ - ubuntu
+ jruby:
+ - jruby
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
- ruby-version: ${{ matrix.jruby }}
bundler-cache: true
+ ruby-version: ${{ matrix.jruby }}
- name: Install dependencies
env:
JRUBY_OPTS: --debug
- run: bundle install
+ run: bundle install --jobs 4 --retry 3
- name: Run tests
env:
JRUBY_OPTS: --debug
diff --git a/README.md b/README.md
index 38f7f81..ea38d9f 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
[![Join the chat at https://gitter.im/hashie/hashie](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/hashie/hashie?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Gem Version](http://img.shields.io/gem/v/hashie.svg)](http://badge.fury.io/rb/hashie)
-[![Build Status](http://img.shields.io/travis/hashie/hashie.svg)](https://travis-ci.org/hashie/hashie)
+[![Build Status](https://github.com/hashie/hashie/actions/workflows/main.yml/badge.svg)](https://github.com/hashie/hashie/actions/workflows/main.yml)
[![eierlegende Wollmilchsau](./mascot.svg)](#mascot) Hashie is a growing collection of tools that extend Hashes and make them more useful.