.github/workflows/commit-checks.yml
name: Commit Checks
on:
push:
branches:
- 'main'
- 'issue[0-9]+'
- 'dev_ver_[0-9]*'
pull_request:
types:
- opened
- edited
- reopened
branches:
- 'main'
- 'issue[0-9]+'
- 'dev_ver_[0-9]*'
jobs:
rubocop:
name: Rubocop
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
- name: Install rubocop
run: gem install --no-document rubocop rubocop-performance rubocop-rspec rubocop-rake # rubocop-i18n rubocop-rails
- name: Run rubocop
run: rubocop
bundle-audit:
name: Bundle Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
- name: Install bundler-audit
run: gem install --no-document bundler-audit
- name: Run audit
run: |
bundle update
bundle audit check --update
rspec:
name: Rspec on Ruby ${{ matrix.ruby }}
runs-on: ubuntu-20.04
strategy:
matrix:
ruby: [
'2.6.0', '2.6.1', '2.6.2', '2.6.3', '2.6.4', '2.6.5', '2.6.6', '2.6.7',
'2.7.0', '2.7.1', '2.7.2', '2.7.3', '2.7.4', '2.7.5', '2.7.6', '2.7.7',
'3.0.0', '3.0.1', '3.0.2', '3.0.3', '3.0.4', '3.0.5',
'3.1.0', '3.1.1', '3.1.2', '3.1.3',
'truffleruby-20.1.0', 'truffleruby-20.2.0', 'truffleruby-20.3.0', 'truffleruby-21.0.0', 'truffleruby-21.1.0', 'truffleruby-21.2.0', 'truffleruby-21.2.0.1', 'truffleruby-22.1.0', 'truffleruby-22.2.0', 'truffleruby-22.3.0',
'jruby-9.3.7.0', 'jruby-9.3.8.0', 'jruby-9.3.9.0', 'jruby-9.4.0.0'
]
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install bundle
run: bundle install
- name: Run tests
run: rspec
- name: Prepare coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.ruby }}
path-to-lcov: ./coverage/lcov/gandi_v5.lcov
parallel: true
coveralls:
name: Send coverage to coveralls.io
needs: rspec
runs-on: ubuntu-latest
steps:
- uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: ./coverage/lcov/gandi_v5.lcov
parallel-finished: true
gem-build:
name: Check gem(s) build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
- name: Check gem builds
run: gem build *.gemspec --strict