-
Notifications
You must be signed in to change notification settings - Fork 2
76 lines (65 loc) · 1.61 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- "*"
jobs:
build:
name: Ruby ${{ matrix.ruby }}, Rails ${{ matrix.rails }}, PostgreSQL ${{ matrix.postgres }}
strategy:
fail-fast: true
matrix:
ruby:
- "3.0"
rails:
- "7.0"
postgres:
- 10
- 11
- 12
- 13
- 14
include: # for backward-compatibility
- ruby: "2.7"
rails: "5.2"
postgres: 10
- ruby: "3.0"
rails: "6.1"
postgres: 10
runs-on: ubuntu-latest
services:
postgres:
image: postgres:${{ matrix.postgres }}
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
RAILS_VERSION: ${{ matrix.rails }}
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependent libraries
run: sudo apt-get install libpq-dev
- name: Install Ruby ${{ matrix.ruby }}
uses: ruby/[email protected]
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # 'bundle install' and cache
- name: Check code style
run: bundle exec rubocop
continue-on-error: false
- name: Run tests
run: bundle exec rake --trace
continue-on-error: false