-
-
Notifications
You must be signed in to change notification settings - Fork 74
38 lines (38 loc) · 1.33 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
37
38
---
name: test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
entry:
- { ruby: 2.6.2, postgresql: 11, active_record: '~> 6.0.0' }
- { ruby: 3.1.1, postgresql: 11, active_record: '~> 6.1.0' }
- { ruby: 3.1.1, postgresql: 14, active_record: '~> 7.0.0' }
name: test (ruby=${{ matrix.entry.ruby }}, postgresql=${{ matrix.entry.postgresql }}, active_record=${{ matrix.entry.active_record }})
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.entry.ruby }}
- uses: browser-actions/setup-geckodriver@latest
with:
token: ${{ secrets.GITHUB_TOKEN }}
- run: geckodriver --version
- uses: harmon758/postgresql-action@v1
with:
postgresql version: ${{ matrix.entry.postgresql }}
postgresql db: slack_ruby_bot_server_test
postgresql user: test
postgresql password: password
- name: Test
uses: GabrielBB/xvfb-action@v1
env:
DATABASE_ADAPTER: activerecord
ACTIVERECORD_VERSION: ${{ matrix.entry.active_record }}
DATABASE_URL: postgres://test:password@localhost/slack_ruby_bot_server_test
with:
run: |
bundle install
bundle exec rake spec