CI #270
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: CI | |
on: | |
push: | |
paths: | |
- '.github/workflows/ci.yml' | |
- 'lib/**' | |
- '*.gemspec' | |
- 'spec/**' | |
- 'Rakefile' | |
- 'Gemfile' | |
- '.rubocop.yml' | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: '30 4 * * *' | |
create: | |
jobs: | |
rubocop: | |
runs-on: ubuntu-latest | |
name: Rubocop | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.2' | |
bundler-cache: true | |
- name: Run linter | |
run: bundle exec rake rubocop | |
tests: | |
runs-on: ubuntu-latest | |
name: Ruby ${{ matrix.ruby }} | |
strategy: | |
matrix: | |
ruby: | |
- '3.2' | |
- '3.1' | |
- '3.0' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Run all tests | |
run: bundle exec rake |