Skip to content

Commit

Permalink
Run tests on more Ruby versions and platforms
Browse files Browse the repository at this point in the history
This is lifted from Ruby's base64 gem's GitHub workflow and depends on
Ruby's on version code which should give us better coverage.

https://github.com/ruby/base64/blob/master/.github/workflows/test.yml
  • Loading branch information
evanleck committed Sep 19, 2023
1 parent cb6f102 commit 6d34603
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Berns
name: Test Suite

concurrency:
cancel-in-progress: true
Expand All @@ -7,22 +7,31 @@ concurrency:
on: [push, pull_request]

jobs:
ruby-versions:
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
min_version: 2.7

test:
needs: ruby-versions
name: Test (${{ matrix.ruby }} / ${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
ruby-version: [3.2, 3.1, '3.0', 2.7]
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
os: [ubuntu-latest, macos-latest, windows-latest]
exclude:
- { os: windows-latest, ruby: truffleruby-head }
- { os: windows-latest, ruby: truffleruby }

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

- name: Set up Ruby ${{ matrix.ruby-version }}
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ${{ matrix.ruby-version }}
ruby-version: ${{ matrix.ruby }}

- name: Run tests & lint
run: bundle exec rake suite

0 comments on commit 6d34603

Please sign in to comment.