File: test.yml

package info (click to toggle)
ruby-mongo 2.21.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 14,764 kB
  • sloc: ruby: 108,806; makefile: 5; sh: 2
file content (59 lines) | stat: -rw-r--r-- 1,917 bytes parent folder | download
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
# Note on topology: server:
# The GH actions use mongo-orchestration, which uses a "server" topology for
# the standalone one.

name: Run Driver Tests
on: [push, pull_request]
jobs:
  build:
    name: "${{matrix.os}} ruby-${{matrix.ruby}} mongodb-${{matrix.mongodb}} ${{matrix.topology}}"
    env:
      CI: true
      TESTOPTS: "-v"
    runs-on: ubuntu-22.04
    continue-on-error: true
    strategy:
      fail-fast: false
      matrix:
        os: [ ubuntu-22.04 ]
        ruby: [ "3.2" ]
        mongodb: [ "7.0", "8.0" ]
        topology: [ replica_set, sharded_cluster ]
    steps:
    - name: repo checkout
      uses: actions/checkout@v2
      with:
        submodules: recursive
    - id: start-mongodb
      name: start mongodb
      uses: mongodb-labs/drivers-evergreen-tools@master
      with:
        version: "${{matrix.mongodb}}"
        topology: "${{matrix.topology}}"
    - name: load ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: "${{matrix.ruby}}"
        bundler: 2
    - name: bundle
      run: bundle install --jobs 4 --retry 3
    - name: prepare test suite
      run: bundle exec rake spec:prepare
      env:
        MONGODB_URI: ${{ steps.start-mongodb.outputs.cluster-uri }}
    - name: prepare replica set
      run: ruby -Ilib -I.evergreen/lib -rbundler/setup -rserver_setup -e ServerSetup.new.setup_tags
      if: ${{ matrix.topology == 'replica_set' }}
      env:
        MONGODB_URI: ${{ steps.start-mongodb.outputs.cluster-uri }}
    - name: wait for sessions
      run: bundle exec rake spec:wait_for_sessions
      if: ${{ matrix.topology == 'sharded_cluster' && matrix.mongodb == '3.6' }}
      env:
        MONGODB_URI: ${{ steps.start-mongodb.outputs.cluster-uri }}
    - name: test
      timeout-minutes: 60
      continue-on-error: false
      run: bundle exec rake spec:ci
      env:
        MONGODB_URI: ${{ steps.start-mongodb.outputs.cluster-uri }}