-
Notifications
You must be signed in to change notification settings - Fork 336
52 lines (52 loc) · 1.37 KB
/
main.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
name: CI
on:
pull_request:
paths-ignore:
- 'README.md'
push:
paths-ignore:
- 'README.md'
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby_version: ['3.0', '3.1', '3.2', '3.3']
rails_version: ['6.1', '7.0', '7.1']
exclude:
- ruby_version: 3.1
rails_version: 6.1
- ruby_version: 3.2
rails_version: 6.1
- ruby_version: 3.3
rails_version: 6.1
services:
db:
image: postgres:16
ports: ["5432:5432"]
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v1
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
- name: Build and run test
env:
DATABASE_URL: postgres://postgres:@localhost:5432/test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
run: |
sudo apt-get -yqq install libpq-dev
bundle
bundle exec appraisal rails_${{ matrix.rails_version }} bundle
bundle exec appraisal rails_${{ matrix.rails_version }} rake