Files
railsgoat/.github/workflows/ci.yml
T
Ken Johnson 499c679a67 Fix: Use bundle exec rails instead of bin/rails
The project doesn't have bin/rails binstubs, so use bundle exec rails
for database setup commands.
2026-01-05 12:37:41 -05:00

42 lines
791 B
YAML

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.4.1']
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Install dependencies
run: bundle install
- name: Setup database
run: |
RAILS_ENV=test bundle exec rails db:create
RAILS_ENV=test bundle exec rails db:migrate
- name: Run tests
env:
RAILSGOAT_MAINTAINER: true
run: bundle exec rspec
- name: Run security audit
run: bundle exec bundle-audit check --update
continue-on-error: true