-
Notifications
You must be signed in to change notification settings - Fork 14
39 lines (35 loc) · 1.08 KB
/
deployment-checks.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
name: Deployment checks
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
env:
DB_HOST: localhost
DB_NAME: tess
DB_USER: tess
DB_PASSWORD: password
SECRET_BASE_KEY: test_key
RAILS_ENV: production
steps:
- uses: harmon758/postgresql-action@v1
with:
postgresql db: ${DB_NAME}
postgresql user: ${DB_USER}
postgresql password: ${DB_PASSWORD}
name: Set up database
- uses: actions/checkout@v4
name: Set up Ruby
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
name: Bundle install
- name: Configure and initialize database
run: |
cp test/config/test_tess.yml config/tess.yml
cp config/secrets.github.yml config/secrets.yml
cp config/ingestion.example.yml config/ingestion.yml
bundle exec rake db:setup
- run: bundle exec rake assets:precompile
name: Run asset compilation
- run: bundle exec whenever --update-crontab --set environment="$ENV"
name: Run whenever update