Skip to content

Commit

Permalink
add GHA test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
amtuannguyen committed Mar 30, 2024
1 parent f2f58ea commit 7d9d455
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/rubyonrails.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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

0 comments on commit 7d9d455

Please sign in to comment.