Skip to content

What are we working in? Rails #16

What are we working in? Rails

What are we working in? Rails #16

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 install a prebuilt Ruby version, install dependencies, and
# run tests and linters.
name: "Ruby on Rails CI"
on: push
# push:
# branches: [ $default-branch, 2024-upgrades-main ]
# pull_request:
# branches: [ $default-branch, 2024-upgrades-main ]
jobs:
test:
runs-on: ubuntu-latest
env:
RAILS_ENV: test
DB_HOST: db
DB_PORT: 5432
DB_USER: rails
DB_PASSWORD: password
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: rails
POSTGRES_PASSWORD: password
steps:
- uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/setup-action
- name: Set up database schema
run: bundle exec rails db:create db:schema:load
- name: Run tests
run: bundle exec rspec
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/setup-action
- name: Generate binstubs
run: bundle binstubs rubocop
# - name: Security audit dependencies
# run: bin/bundler-audit --update
# - name: Security audit application code
# run: bin/brakeman -q -w2
- name: Lint Ruby files
run: bin/rubocop --parallel