Skip to content

Setup minitest CI with GitHub actions #1

Setup minitest CI with GitHub actions

Setup minitest CI with GitHub actions #1

Workflow file for this run

name: minitest
on:
pull_request:
branches: [version-2]
jobs:
run-minitest:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
ports: ["5432:5432"]
env:
POSTGRES_DB: rails_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 15
env:
RAILS_ENV: test
DATABASE_URL: postgres://postgres:postgres@localhost:5432/rails_test
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Preparing database
run: bin/rails db:prepare
- name: Run tests
run: bin/rails test