Skip to content

Add webrick to dev dependencies #21

Add webrick to dev dependencies

Add webrick to dev dependencies #21

Workflow file for this run

name: Run tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
permissions:
actions: write
checks: write
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
matrix:
ruby-version: ['2.6', '2.7', '3.0']
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: Run rubocop
run: bundle exec rubocop
continue-on-error: true
- name: Run tests
run: bundle exec rake test
env:
RAILS_DB_HOST: localhost
RAILS_DB_USER: postgres
RAILS_DB_PASSWORD: postgres
- uses: joshmfrankel/simplecov-check-action@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}