-
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.39 KB
/
test.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
44
45
46
47
48
49
50
51
52
53
54
55
name: Tests
on: push
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14-alpine
ports: ['5432:5432']
env:
POSTGRES_DB: test
POSTGRES_USER: test
POSTGRES_PASSWORD: test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
RAILS_ENV: test
DATABASE_URL: postgres://test:test@localhost:5432/test
CI: "true"
DOMAIN_NAME: xxxx
DOMAIN_EMAIL_ADDRESS: xxxx
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY: ${{ secrets.ARE_PRIMARY_KEY }}
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY: ${{ secrets.ARE_DETERMINISTIC_KEY }}
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT: ${{ secrets.ARE_KEY_DERIVATION_SALT }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Ruby based on .ruby-version
uses: ruby/setup-ruby@v1
- name: Restore bundle cache
uses: actions/cache@v4
with:
path: vendor/bundle
key: ${{runner.os}}-gems-${{hashFiles('**/Gemfile.lock')}}
restore-keys: ${{runner.os}}-gems-
- name: Bundle install
run: |
gem install bundler
bundle install
- name: Setup database
run: bundle exec rake db:create db:schema:load
- name: Run tests
run: bin/rspec