2021-05-04 15:49:22 +00:00
|
|
|
name: Main
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: 'CI Tests'
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest]
|
|
|
|
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
|
2022-04-11 18:33:52 +00:00
|
|
|
ruby: [jruby, truffleruby, 2.5, 2.6, 2.7, '3.0', 3.1, head]
|
2021-05-04 15:49:22 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
2022-04-23 20:40:26 +00:00
|
|
|
- uses: actions/checkout@v3.0.2
|
2022-04-11 18:56:27 +00:00
|
|
|
|
|
|
|
# Conditionally configure bundler via environment variables as advised
|
|
|
|
# * https://github.com/ruby/setup-ruby#bundle-config
|
|
|
|
- name: Set bundler environment variables
|
|
|
|
run: |
|
|
|
|
echo "BUNDLE_WITHOUT=checks" >> $GITHUB_ENV
|
|
|
|
if: matrix.ruby != 3.1
|
|
|
|
|
2021-05-04 15:49:22 +00:00
|
|
|
- uses: ruby/setup-ruby@v1
|
|
|
|
with:
|
|
|
|
ruby-version: ${{ matrix.ruby }}
|
2021-05-07 23:27:30 +00:00
|
|
|
bundler-cache: true
|
2022-04-11 18:56:27 +00:00
|
|
|
|
2021-05-04 15:49:22 +00:00
|
|
|
- run: bundle exec rspec
|
2022-04-11 18:56:27 +00:00
|
|
|
|
2022-04-23 20:40:57 +00:00
|
|
|
- uses: codecov/codecov-action@v3.1.0
|
2021-05-07 13:49:58 +00:00
|
|
|
with:
|
|
|
|
name: ${{ matrix.ruby }}
|
|
|
|
file: ./coverage/coverage.xml
|
2022-04-11 18:56:27 +00:00
|
|
|
|
2021-05-10 16:26:41 +00:00
|
|
|
- run: bundle exec rubocop
|
2022-04-11 18:56:27 +00:00
|
|
|
if: matrix.ruby == 3.1
|