Repository navigation
51 lines (51 loc) · 2.07 KB
/
Copy pathtest-mongodb.yml
File metadata and controls
51 lines (51 loc) · 2.07 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
---
name: MongoDB
on: [push, pull_request]
permissions:
contents: read
concurrency:
group: mongodb-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-24.04
timeout-minutes: 20
env:
DATABASE_ADAPTER: mongoid
MONGOID_VERSION: ${{ matrix.entry.mongoid }}
GRAPE_VERSION: ${{ matrix.entry.grape || '>= 0' }}
JSON_VERSION: ${{ matrix.entry.json }}
strategy:
fail-fast: false
matrix:
entry:
# These Active Support versions pass quirks_mode, removed in JSON 3.
- { ruby: '3.2', mongoid: '6.4.8', mongodb: '4.4', json: '~> 2.0' }
- { ruby: '3.4', mongoid: '7.5.2', mongodb: '5.0', json: '~> 2.0' }
- { ruby: '3.4', mongoid: '8.1.11', mongodb: '8.0', json: '~> 2.0' }
- { ruby: '3.3', mongoid: '~> 9.1', mongodb: '8.0', grape: '~> 3.2', json: '~> 3.0' }
- { ruby: '3.4', mongoid: '~> 9.1', mongodb: '8.0', grape: '~> 4.0', json: '~> 3.0' }
- { ruby: '4.0', mongoid: '~> 9.1', mongodb: '8.0', grape: '~> 4.0', json: '~> 3.0' }
name: test (ruby=${{ matrix.entry.ruby }}, mongoid=${{ matrix.entry.mongoid }}, mongodb=${{ matrix.entry.mongodb }}, grape=${{ matrix.entry.grape || 'auto' }}, json=${{ matrix.entry.json }})
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
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.entry.ruby }}
bundler-cache: true
cache-version: mongoid-${{ matrix.entry.mongoid }}-grape-${{ matrix.entry.grape || 'auto' }}-json-${{ matrix.entry.json }}
- uses: browser-actions/setup-firefox@v1.7.2
with:
firefox-version: latest
- name: Test
run: xvfb-run --auto-servernum bundle exec rake spec