-
Notifications
You must be signed in to change notification settings - Fork 1
156 lines (147 loc) · 4.59 KB
/
test.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
---
name: Tests
'on':
- push
- pull_request
jobs:
rubocop:
runs-on: ubuntu-latest
env:
CI: true
TESTOPTS: "-v"
steps:
- uses: actions/checkout@v3
- name: Set up Ruby 3.2
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Run RuboCop
run: bundle exec rubocop --parallel
test:
name: "${{matrix.ruby}}
${{matrix.gemfile || 'Gemfile'}}
db:${{matrix.mongodb || '6.0'}}
fle:${{matrix.fle && 'fle=' || ''}}${{matrix.fle || ''}}
top:${{matrix.topology || 'server'}}
os:${{matrix.os || 'ubuntu-20.04'}}"
env:
CI: true
TESTOPTS: '-v'
runs-on: ${{matrix.os || 'ubuntu-20.04'}}
continue-on-error: "${{matrix.experimental || false}}"
strategy:
fail-fast: false
matrix:
ruby: [ruby-2.7, ruby-3.0, ruby-3.1, ruby-3.2]
# TODO: Use ubuntu-latest when supported.
# See: https://github.com/mongodb-labs/drivers-evergreen-tools/issues/283
os: ['ubuntu-20.04']
topology: [server, replica_set, sharded_cluster]
include:
# TODO: OS versions
# - os: macos-latest
# ruby: ruby-3.2
# - os: windows-latest
# ruby: ruby-3.2
# Rails versions
- ruby: ruby-3.2
gemfile: gemfiles/rails_7.1.gemfile
mongodb: '6.0'
topology: replica_set
- ruby: ruby-3.1
gemfile: gemfiles/rails_7.1.gemfile
mongodb: '5.0'
topology: sharded_cluster
- ruby: ruby-3.0
gemfile: gemfiles/rails_7.0.gemfile
mongodb: '4.4'
topology: server
- ruby: ruby-3.0
gemfile: gemfiles/rails_6.1.gemfile
mongodb: '4.4'
topology: replica_set
- ruby: ruby-2.7
gemfile: gemfiles/rails_6.1.gemfile
mongodb: '4.4'
topology: server
# Driver versions
# TODO: driver_master is broken
# - ruby: ruby-3.2
# gemfile: gemfiles/driver_master.gemfile
# mongodb: '6.0'
# topology: replica_set
- ruby: ruby-3.0
gemfile: gemfiles/driver_stable.gemfile
mongodb: '5.0'
topology: sharded_cluster
- ruby: ruby-2.7
gemfile: gemfiles/driver_min.gemfile
mongodb: '4.4'
topology: replica_set
# BSON versions
# TODO: bson_master is broken
# - ruby: ruby-3.2
# gemfile: gemfiles/bson_master.gemfile
# mongodb: '6.0'
# topology: replica_set
- ruby: ruby-2.7
gemfile: gemfiles/bson_min.gemfile
mongodb: '4.4'
topology: replica_set
# JRuby
- ruby: jruby-9.4
gemfile: gemfiles/rails_7.1.gemfile
mongodb: '6.0'
topology: replica_set
- ruby: jruby-9.4
gemfile: gemfiles/rails_6.1.gemfile
mongodb: '5.0'
topology: server
# Field-Level Encryption
# TODO: support LIBMONGOCRYPT via path
- ruby: ruby-3.2
gemfile: gemfiles/rails_7.1.gemfile
mongodb: '6.0'
topology: sharded_cluster
fle: helper
- ruby: ruby-3.1
gemfile: gemfiles/rails_7.0.gemfile
mongodb: '6.0'
topology: replica_set
fle: helper
- ruby: ruby-2.7
gemfile: gemfiles/rails_6.1.gemfile
mongodb: '6.0'
topology: server
fle: helper
steps:
- name: repo checkout
uses: actions/checkout@v3
- id: start-mongodb
name: start mongodb
uses: mongodb-labs/drivers-evergreen-tools@master
with:
version: "${{matrix.mongodb || '6.0'}}"
topology: "${{matrix.topology || 'server'}}"
- name: load ruby
uses: ruby/setup-ruby@v1
env:
BUNDLE_GEMFILE: "${{matrix.gemfile || 'Gemfile'}}"
FLE: "${{matrix.fle || ''}}"
with:
ruby-version: "${{matrix.ruby}}"
bundler: 2
- name: bundle
run: bundle install --jobs 4 --retry 3
env:
BUNDLE_GEMFILE: "${{matrix.gemfile || 'Gemfile'}}"
FLE: "${{matrix.fle || ''}}"
- name: test
timeout-minutes: 60
continue-on-error: "${{matrix.experimental || false}}"
run: bundle exec rake spec
env:
BUNDLE_GEMFILE: "${{matrix.gemfile || 'Gemfile'}}"
FLE: "${{matrix.fle || ''}}"
MONGODB_URI: "${{steps.start-mongodb.outputs.cluster-uri}}"