Pin bundler on 2.7 (#51) #82
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
name: Checks | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
# 3.0 in quotes for https://github.com/actions/runner/issues/849 | |
SUPPORTED_VERSIONS: "[ 2.7, '3.0', 3.1, 3.2]" | |
jobs: | |
supported-versions: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- id: set-matrix | |
run: | | |
echo "matrix=${{env.SUPPORTED_VERSIONS}}" >> $GITHUB_OUTPUT | |
unit-test: | |
needs: supported-versions | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby-version: ${{fromJson(needs.supported-versions.outputs.matrix)}} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby ${{ matrix.ruby-version }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
# The last version of bundler (>= 0) to support your Ruby & RubyGems was 2.4.22. | |
- run: gem install bundler | |
if: ${{ matrix.ruby-version != '2.7' }} | |
- run: gem install bundler -v 2.4.22 | |
if: ${{ matrix.ruby-version == '2.7' }} | |
- run: bundle install | |
- run: rake test | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3 | |
- run: | | |
gem install bundler | |
bundle install | |
- run: rake rubocop | |
integration-test: | |
needs: supported-versions | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby-version: ${{fromJson(needs.supported-versions.outputs.matrix)}} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby ${{ matrix.ruby-version }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
# The last version of bundler (>= 0) to support your Ruby & RubyGems was 2.4.22. | |
- run: gem install bundler | |
if: ${{ matrix.ruby-version != '2.7' }} | |
- run: gem install bundler -v 2.4.22 | |
if: ${{ matrix.ruby-version == '2.7' }} | |
- run: bundle install | |
- run: rake test:integration:fluent | |
all-passed: | |
needs: [unit-test,lint,integration-test] | |
runs-on: ubuntu-latest | |
steps: | |
- name: All checks passed | |
run: 'true' |