Skip to content

Commit

Permalink
Add CI file with rubocop and requirements coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
tstrass committed Oct 10, 2024
1 parent 4d231c0 commit bb78b86
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Ruby

on:
push:
branches: [ main, fi-3237-add-ci ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.1.2']

steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

test:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.1.2']
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
run: bundle exec rake

lint:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.1.2']
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Rubocop
run: bundle exec rubocop

requirements-coverage:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.1.2']
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Create Database
run: bundle exec inferno migrate
- name: Check Coverage
run: bundle exec rake requirements:check_coverage

0 comments on commit bb78b86

Please sign in to comment.