diff options
author | Michael Herold <opensource@michaeljherold.com> | 2021-06-27 22:26:11 -0500 |
---|---|---|
committer | Michael Herold <opensource@michaeljherold.com> | 2021-06-27 22:48:03 -0500 |
commit | e8819816be56e92e583f09a33e48a39ae51e85fd (patch) | |
tree | 11b1b0f3561151dcac07e66f3805d421e2e03c6f | |
parent | da421967765e7766136f2547b4074043f957c297 (diff) | |
download | hashie-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.yml | 50 | ||||
-rw-r--r-- | README.md | 2 |
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 @@ -2,7 +2,7 @@ [](https://gitter.im/hashie/hashie?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](http://badge.fury.io/rb/hashie) -[](https://travis-ci.org/hashie/hashie) +[](https://github.com/hashie/hashie/actions/workflows/main.yml) [](#mascot) Hashie is a growing collection of tools that extend Hashes and make them more useful. |