Skip to content

Upgrade Ruby and Rails #275

Upgrade Ruby and Rails

Upgrade Ruby and Rails #275

Workflow file for this run

name: Main
on:
push:
branches: [main, master]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
name: Tests
services:
postgres:
image: postgres:16
env:
POSTGRES_DB: triage_test
POSTGRES_PASSWORD: password
POSTGRES_USER: postgres
ports: ["5432:5432"]
options: >-
--health-cmd="pg_isready"
--health-interval=10s
--health-timeout=5s
--health-retries=5
env:
BUNDLE_GEMFILE: Gemfile
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version-file: '.ruby-version'
bundler-cache: true
- name: Linting
run: bundle exec standardrb
- name: Setup database
run: |
cp config/database.ci.yml config/database.yml
RAILS_ENV=test bundle exec rake db:create db:schema:load
- name: Run tests
run: bin/rake test
- name: Ensure seed task still works
run: RAILS_ENV=test bin/rails db:seed