-
Notifications
You must be signed in to change notification settings - Fork 471
86 lines (83 loc) · 2.51 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
77
78
79
80
81
82
83
84
85
86
name: RSpec
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
permissions:
contents: read
jobs:
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
- name: Run rubocop
run: bundle exec rubocop --parallel --format progress
test:
strategy:
matrix:
entry:
- { ruby: '3.0', grape: '1.7.1' }
- { ruby: '3.1', grape: '1.7.1' }
- { ruby: '3.2', grape: '1.7.1' }
- { ruby: '3.3', grape: '1.7.1' }
- { ruby: 'head', grape: '1.7.1' }
- { ruby: '3.0', grape: '1.8.0' }
- { ruby: '3.1', grape: '1.8.0' }
- { ruby: '3.2', grape: '1.8.0' }
- { ruby: '3.3', grape: '1.8.0' }
- { ruby: 'head', grape: '1.8.0' }
- { ruby: '3.0', grape: '2.0.0' }
- { ruby: '3.1', grape: '2.0.0' }
- { ruby: '3.2', grape: '2.0.0' }
- { ruby: '3.3', grape: '2.0.0' }
- { ruby: 'head', grape: '2.0.0' }
- { ruby: '3.0', grape: '2.1.3' }
- { ruby: '3.1', grape: '2.1.3' }
- { ruby: '3.2', grape: '2.1.3' }
- { ruby: '3.3', grape: '2.1.3' }
- { ruby: 'head', grape: '2.1.3' }
- { ruby: '3.0', grape: '2.2.0' }
- { ruby: '3.1', grape: '2.2.0' }
- { ruby: '3.2', grape: '2.2.0' }
- { ruby: '3.3', grape: '2.2.0' }
- { ruby: 'head', grape: '2.2.0' }
- { ruby: '3.0', grape: 'HEAD' }
- { ruby: '3.1', grape: 'HEAD' }
- { ruby: '3.2', grape: 'HEAD' }
- { ruby: '3.3', grape: 'HEAD' }
- { ruby: 'head', grape: 'HEAD' }
name: test (ruby=${{ matrix.entry.ruby }}, grape=${{ matrix.entry.grape }})
runs-on: ubuntu-latest
needs: ['rubocop']
env:
GRAPE_VERSION: ${{ matrix.entry.grape }}
steps:
- name: Check out branch
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.entry.ruby }}
- name: Run rspec wo model parser
run: |
bundle update
bundle exec rspec
- name: Run rspec w entity parser
env:
MODEL_PARSER: grape-swagger-entity
run: |
bundle update
bundle exec rspec
- name: Run rspec w representable parser
env:
MODEL_PARSER: grape-swagger-representable
run: |
bundle update
bundle exec rspec