-
Notifications
You must be signed in to change notification settings - Fork 8
90 lines (88 loc) · 4.43 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
name: CI RSpec Test
on: [push, pull_request]
jobs:
build:
name: >-
Mongoid Test with: - Ruby ${{ matrix.entry.ruby }} - MongoDB ${{ matrix.entry.mongodb }} - Gemfile ${{ matrix.entry.gemfile }})
env:
CI: true
TESTOPTS: "-v"
BUNDLE_GEMFILE: gemfiles/${{ matrix.entry.gemfile }}.gemfile
runs-on: ubuntu-latest
continue-on-error: false
strategy:
matrix:
entry:
- { ruby: "2.6", gemfile: 'mongoid_3', mongodb: "3.6" }
- { ruby: "2.6", gemfile: 'mongoid_4', mongodb: "3.6" }
- { ruby: "2.6", gemfile: 'mongoid_4', mongodb: "3.6" }
- { ruby: "2.6", gemfile: 'mongoid_5', mongodb: "3.6" }
- { ruby: "2.6", gemfile: 'mongoid_5', mongodb: "3.6" }
- { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "3.6" }
- { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "3.6" }
- { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "3.6" }
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "3.6" }
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "3.6" }
- { ruby: "2.7", gemfile: 'mongoid_7', mongodb: "3.6" }
- { ruby: "3.0", gemfile: 'mongoid_8', mongodb: "3.6" }
- { ruby: "3.1", gemfile: 'mongoid_8', mongodb: "3.6" }
- { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "4.0" }
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "4.0" }
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "4.0" }
- { ruby: "2.7", gemfile: 'mongoid_7', mongodb: "4.0" }
- { ruby: "3.0", gemfile: 'mongoid_8', mongodb: "4.0" }
- { ruby: "3.1", gemfile: 'mongoid_8', mongodb: "4.0" }
- { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "4.2" }
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "4.2" }
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "4.2" }
- { ruby: "2.7", gemfile: 'mongoid_7', mongodb: "4.2" }
- { ruby: "3.0", gemfile: 'mongoid_8', mongodb: "4.2" }
- { ruby: "3.1", gemfile: 'mongoid_8', mongodb: "4.2" }
- { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "4.4" }
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "4.4" }
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "4.4" }
- { ruby: "2.7", gemfile: 'mongoid_7', mongodb: "4.4" }
- { ruby: "3.0", gemfile: 'mongoid_8', mongodb: "4.4" }
- { ruby: "3.1", gemfile: 'mongoid_8', mongodb: "4.4" }
- { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "5.0" }
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "5.0" }
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "5.0" }
- { ruby: "2.7", gemfile: 'mongoid_7', mongodb: "5.0" }
- { ruby: "3.0", gemfile: 'mongoid_8', mongodb: "5.0" }
- { ruby: "3.1", gemfile: 'mongoid_8', mongodb: "5.0" }
- { ruby: "3.1", gemfile: 'mongoid_9', mongodb: "5.0" }
- { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "6.0" }
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "6.0" }
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "6.0" }
- { ruby: "2.7", gemfile: 'mongoid_7', mongodb: "6.0" }
- { ruby: "3.0", gemfile: 'mongoid_8', mongodb: "6.0" }
- { ruby: "3.1", gemfile: 'mongoid_8', mongodb: "6.0" }
- { ruby: "3.1", gemfile: 'mongoid_9', mongodb: "6.0" }
- { ruby: "2.6", gemfile: 'mongoid_6', mongodb: "7.0" }
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "7.0" }
- { ruby: "2.6", gemfile: 'mongoid_7', mongodb: "7.0" }
- { ruby: "2.7", gemfile: 'mongoid_7', mongodb: "7.0" }
- { ruby: "3.0", gemfile: 'mongoid_8', mongodb: "7.0" }
- { ruby: "3.1", gemfile: 'mongoid_8', mongodb: "7.0" }
- { ruby: "3.1", gemfile: 'mongoid_9', mongodb: "7.0" }
steps:
- name: Cache Gems
uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Set up MongoDB ${{ matrix.entry.mongodb }}
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.entry.mongodb }}
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.entry.ruby }}
bundler: '2'
bundler-cache: true
- name: Run tests
run: bundle exec rake