-
Notifications
You must be signed in to change notification settings - Fork 11
36 lines (36 loc) · 1.15 KB
/
test-postgresql.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
---
name: test with postgresql
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
entry:
- { ruby: 2.6.2, postgresql: 11 }
- { ruby: 2.6.2, postgresql: 14 }
- { ruby: 3.1.1, postgresql: 14 }
name: test (ruby=${{ matrix.entry.ruby }}, postgresql=${{ matrix.entry.postgresql }})
services:
postgres:
image: postgres:${{ matrix.entry.postgresql }}
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: password
POSTGRES_DB: slack_ruby_bot_server_events_test
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.entry.ruby }}
- name: Test
run: |
bundle install
bundle exec rake spec
env:
DATABASE_ADAPTER: activerecord
DATABASE_URL: postgres://test:password@localhost/slack_ruby_bot_server_events_test