forked from CircuitVerse/CircuitVerse
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (43 loc) · 1.15 KB
/
database_checker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: "DBChecker"
on:
[push, pull_request, workflow_dispatch]
jobs:
db_check:
name: DB Check
runs-on: ubuntu-latest
services:
redis:
image: redis:alpine
ports: ["6379:6379"]
options: --entrypoint redis-server
env:
REDIS_HOST: redis
REDIS_PORT: 6379
postgres:
image: postgres:11-alpine
ports:
- "5432:5432"
env:
POSTGRES_DB: rails_test
POSTGRES_USER: rails
POSTGRES_PASSWORD: password
env:
RAILS_ENV: test
DATABASE_URL: "postgres://rails:password@localhost:5432/rails_test"
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Ruby and Gems
uses: ruby/setup-ruby@v1 # v1.115.3
with:
bundler-cache: true
- name: Copy the sample ENV Config
run: cp .env.example .env
- name: Set up database schema
run: bin/rails db:schema:load
- name: Run data migration tasks
run: bin/rails data:migrate
- name: DB Check
run: bundle exec database_consistency