Skip to content

Fix CI: update tested Ruby versions, remove deprecated set-output #65

Fix CI: update tested Ruby versions, remove deprecated set-output

Fix CI: update tested Ruby versions, remove deprecated set-output #65

Workflow file for this run

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 }}
- run: |
gem install bundler
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 }}
- run: |
gem install bundler
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'