Transition CI to GitHub Actions #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Ruby on Rails CI" | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:latest | |
ports: | |
- "5432:5432" | |
env: | |
POSTGRES_USER: til_test | |
POSTGRES_PASSWORD: pwd | |
env: | |
RAILS_ENV: test | |
DATABASE_URL: "postgres://til_test:pwd@localhost:5432/til_test" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Ruby and gems | |
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf | |
with: | |
bundler-cache: false | |
- name: Set up database schema | |
run: bin/rails db:setup | |
- name: Run tests | |
run: bin/rake |