-
Notifications
You must be signed in to change notification settings - Fork 6
38 lines (38 loc) · 971 Bytes
/
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
---
name: test
jobs:
test:
container:
image: ruby:2.7.7
env:
DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres
ENCRYPTION_KEY: abcdefghijklmn
runs-on: ubuntu-22.04
steps:
- name: workaround
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v3
- name: before_install
run: bundle install
- name: script
run: |-
set -e
bundle exec rake db:create
bundle exec rake db:setup
bundle exec rspec
services:
postgres:
# Docker Hub image
image: postgres:11
# Provide the password for postgres
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
'on':
push:
branches: '*'