Repository navigation
55 lines (54 loc) · 2.09 KB
/
Copy pathci.yml
File metadata and controls
55 lines (54 loc) · 2.09 KB
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
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
entry:
- { ruby: '2.7', mongodb: '4.4', mongoid: '6' }
- { ruby: '2.7', mongodb: '4.4', mongoid: '7' }
- { ruby: '3.0', mongodb: '4.4', mongoid: '6' }
- { ruby: '3.0', mongodb: '4.4', mongoid: '7' }
- { ruby: '3.2', mongodb: '5.0', mongoid: '7' }
- { ruby: '3.2', mongodb: '6.0', mongoid: '7' }
- { ruby: '3.1', mongodb: '4.4', mongoid: '8' }
- { ruby: '3.2', mongodb: '5.0', mongoid: '8' }
- { ruby: '3.2', mongodb: '6.0', mongoid: '8' }
- { ruby: '3.2', mongodb: '7.0', mongoid: '8' }
- { ruby: '3.3', mongodb: '6.0', mongoid: '9' }
- { ruby: '3.3', mongodb: '7.0', mongoid: '9' }
- { ruby: '3.4', mongodb: '8.0', mongoid: '9' }
- { ruby: '4.0', mongodb: '8.0', mongoid: '9', coverage: 'true' }
name: test (ruby=${{ matrix.entry.ruby }}, mongodb=${{ matrix.entry.mongodb }}), mongoid=${{ matrix.entry.mongoid }})
env:
MONGOID_VERSION: ${{ matrix.entry.mongoid }}
COVERAGE: ${{ matrix.entry.coverage }}
services:
mongodb:
image: mongo:${{ matrix.entry.mongodb }}
ports: ['27017:27017']
options: >-
--health-cmd "mongosh --quiet --eval 'db.adminCommand({ping: 1})' || mongo --quiet --eval 'db.adminCommand({ping: 1})'"
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v7
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.entry.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rspec
- name: Run examples
run: bundle exec ruby examples/feed.rb
- name: Report Coverage
if: ${{ matrix.entry.coverage == 'true' }}
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: coverage/.resultset.json
format: simplecov