-
Notifications
You must be signed in to change notification settings - Fork 65
39 lines (37 loc) · 993 Bytes
/
ci.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: ci
on:
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports: ['5432:5432']
options:
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.1
- name: Setup environment and run tests
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/test
RAILS_ENV: test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
RUBY_SG_BOT_ID: 6124430288
RUBY_SG_BOT_TOKEN: access-token
run: |
bundle install
bundle exec rails db:create db:migrate
bundle exec rspec spec