Skip to content

back the ci.yml file #12

back the ci.yml file

back the ci.yml file #12

Workflow file for this run

name: Tests
on:
pull_request:
branches:
- "*"
push:
branches:
- "main"
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports: ["5432:5432"]
steps:
- uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Make bin/rails executable
run: chmod +x bin/rails
- name: Run tests
env:
DATABASE_URL: postgres://postgres:password@localhost:5432/test
RAILS_ENV: test
run: |
bin/rails test:prepare
bin/rails db:test:prepare
bin/rails test