Skip to content

Ruby

Ruby #180

Workflow file for this run

name: Ruby
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '0 5 * * MON'
concurrency:
# Pushing new changes to a branch will cancel any in-progress CI runs
group: ${{ github.ref }}
cancel-in-progress: true
# Restrict jobs in this workflow to only be allowed to read this repo by default.
#
# If you are wanting to introduce a job/tool that requires more permissions (such
# as posting comments or commits to the repository), then you should grant just
# that job the necessarily permissions by giving it a dedicated `permissions` block.
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-node@v3
- run: npx prettier --check .
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
ruby: ['2.6', '2.7', '3.0', '3.1', head]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rspec
- name: Archive spec outputs
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: rspec-output-coverage-${{ matrix.os }}-${{ matrix.ruby }}
path: coverage/
retention-days: 5
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6'
bundler-cache: true
- run: bundle exec rubocop