DigitalNZ/plug

View on GitHub
.github/workflows/ci.yml

Summary

Maintainability
Test Coverage
name: CI

on:
  pull_request:
  push:
    branches:
      - master

jobs:
  ci_checks:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        ruby:
          - 3.0.3
          - 3.0.6
          - 3.1.4
          - 3.2.2

    name: Ruby ${{ matrix.ruby }} sample

    steps:
      - name: Checkout this repo
        uses: actions/checkout@v2

      - name: Install Ruby and Bundler
        uses: ruby/setup-ruby@v1
        with:
          bundler-cache: true
          ruby-version: ${{ matrix.ruby }}

      - name: Run rubocop
        run: |
          bundle exec rubocop
      - name: Run tests
        run: |
          RAILS_ENV=test bin/rails db:migrate
          bundle exec rspec