Skip to content

add GHA test workflow #18

add GHA test workflow

add GHA test workflow #18

Workflow file for this run

# This workflow will install a prebuilt Ruby version, install dependencies, and
# run tests and linters.
name: "Ruby on Rails CI"
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
test:
runs-on: ubuntu-latest
env:
RAILS_ENV: test
DB_ADAPTER: sqlite3
DATABASE_URL: db/test.sqlite3
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Ruby and gems
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
with:
bundler-cache: true
- name: Run tests
run: |
bundle install
bundle exec rails db:create
bundle exec rails test