-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
19 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,31 @@ | ||
name: Test | ||
name: Ruby | ||
|
||
on: | ||
push: | ||
branches: [main, master] # TODO: rename and get rid of 'master' | ||
# Triggers the workflow on pull request events. | ||
branches: [ master, main ] | ||
paths-ignore: | ||
- '**/*.md' | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# This allows a subsequently queued workflow run to interrupt previous runs. | ||
concurrency: | ||
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" | ||
cancel-in-progress: true | ||
branches: [ master, main ] | ||
paths-ignore: | ||
- '**/*.md' | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
ruby-version: ['2.6', '2.7', '3.0', '3.1', '3.2', 'jruby'] | ||
platform: [ubuntu-latest, macos-latest, windows-latest] | ||
ruby: | ||
# https://www.ruby-lang.org/en/downloads/branches/ | ||
- "ruby-3.0" | ||
- "ruby-3.1" | ||
- "ruby-3.2" | ||
- "ruby-3.3" | ||
- "ruby-head" | ||
# https://github.com/jruby/jruby/discussions/7915 | ||
- "jruby-9.4" | ||
- "jruby-head" | ||
runs-on: ${{ matrix.platform }} | ||
name: "Test (Ruby ${{ matrix.ruby }})" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- run: gem install bundler | ||
- run: bundle install --jobs 4 --retry 2 | ||
- run: bundle exec rake | ||
- uses: actions/checkout@v2 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
bundler-cache: true | ||
- name: Run tests | ||
run: gem install bundler | ||
run: bundle exec rake | ||
|