need a database for this one #1
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
1.2.13# This workflow will ensure that when we run `rails db:migrate` that no changes are made to `db/schema.rb`. | ||
# | ||
# This workflow is pimarily meant to be called by other workflows, but it can be run manually. | ||
name: "🔎 ~ Database Schema Check" | ||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgres:11-alpine | ||
ports: | ||
- "5432:5432" | ||
env: | ||
POSTGRES_DB: rails_test | ||
POSTGRES_USER: rails | ||
POSTGRES_PASSWORD: password | ||
# Set health checks to wait until postgres has started | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
env: | ||
RAILS_ENV: test | ||
BUNDLE_JOBS: 2 | ||
BUNDLE_RETRY: 3 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install Ruby and gems | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
- name: Database Schema Check | ||
id: db-schema-check | ||
run : bash ./.circleci/db_schema_check |