Skip to content

CI

CI #211

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
schedule:
- cron: '0 0 * * 0'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby_version: ['3.3', '3.2', '3.1', '3.0']
steps:
- uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Bundle update
run: |
bundle update
- name: Run test
run: |
bundle exec rspec --profile 10 \
--format RspecJunitFormatter \
--out test_results/rspec.xml \
--format progress
- name: Upload code coverage
uses: codecov/codecov-action@v3
with:
files: ./coverage/coverage.xml
- name: Run rubocop
run: |
bundle exec rake rubocop
- name: Run rufo
run: |
bundle exec rake rufo:run
- name: Verify rufo works against sample codebases
run: |
bin/verify-sample-code
- name: Save test results
uses: actions/upload-artifact@v3
if: always()
with:
name: coverage-ruby-${{ matrix.ruby_version }}
path: coverage