Skip to content

ci: setup automatic publishing (#57) #112

ci: setup automatic publishing (#57)

ci: setup automatic publishing (#57) #112

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
# Pushing new changes to a branch will cancel any in-progress CI runs
group: ${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
- run: bundle exec rubocop
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby-version: ['2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3']
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- uses: actions/setup-node@v4
with:
cache: 'npm'
- run: npm ci
- run: bundle exec rake spec
env:
CI_CHROME_FLAGS: "--headless"