Skip to content

Commit

Permalink
Add GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkhan committed Aug 6, 2024
1 parent b303490 commit 3e955f7
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/minitest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Rails Minitest

on:
push:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

defaults:
run:
working-directory: example

services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options:
--health-cmd="pg_isready" --health-interval=10s --health-timeout=5s
--health-retries=3

steps:
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3.2"
bundler-cache: true
working-directory: example

- name: Install dependencies
run: bundle install

- name: Set up database
run: |
bin/rails db:create
bin/rails db:schema:load
- name: Run tests
run: bin/rails test -b

0 comments on commit 3e955f7

Please sign in to comment.