-
Notifications
You must be signed in to change notification settings - Fork 46
75 lines (71 loc) · 2.05 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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }} | Gemfile ${{ matrix.gemfile }}
continue-on-error: ${{ matrix.gemfile == 'rails_edge' }}
services:
redis:
image: redis
ports:
- 6379:6379
strategy:
fail-fast: false
matrix:
ruby: ["2.6", "2.7", "3.0", "3.1", "3.2"]
gemfile: [rails_5_2, rails_6_0, rails_6_1, rails_7_0, rails_edge]
exclude:
- ruby: "2.6"
gemfile: rails_7_0
- ruby: "2.6"
gemfile: rails_edge
- ruby: "3.0"
gemfile: rails_5_2
- ruby: "3.1"
gemfile: rails_5_2
- ruby: "3.2"
gemfile: rails_5_2
- ruby: "3.1"
gemfile: rails_6_0
- ruby: "3.2"
gemfile: rails_6_0
- ruby: "3.2"
gemfile: rails_6_1
include:
- ruby: head
gemfile: rails_edge
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Start MySQL and create DB
run: |
sudo systemctl start mysql.service
mysql -uroot -h localhost -proot -e "CREATE DATABASE job_iteration_test;"
- name: Ruby tests
run: bundle exec rake test
env:
REDIS_HOST: localhost
REDIS_PORT: ${{ job.services.redis.ports[6379] }}
lint:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: true
- name: Rubocop
run: bundle exec rubocop
- name: Documentation correctly written
run: bundle exec yardoc --no-output --no-save --no-stats --fail-on-warning