Skip to content

Commit

Permalink
MONGOID-5216 Run all tests in docker on evergreen (mongodb#5306)
Browse files Browse the repository at this point in the history
* MONGOID-5216 Run all tests in docker on evergreen

* set up erb preprocessing for evergreen config files

* check that docker distro is set and quote properly

* typo fix

* update mrss

* use the os selector

* add some whitespace

* set node environment from toolchain also

* Work around ruby 3.1 incompatibility with rails

* fix bundle install on jruby 9.2

Co-authored-by: Oleg Pudeyev <[email protected]>
  • Loading branch information
p-mongo and p authored Jun 10, 2022
1 parent 13044a8 commit 306b019
Show file tree
Hide file tree
Showing 11 changed files with 905 additions and 51 deletions.
89 changes: 44 additions & 45 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
########################################
# Evergreen Template for MongoDB Drivers
########################################
# GENERATED FILE - DO NOT EDIT.
# Run ./.evergreen/update-evergreen-configs to regenerate this file.

# When a task that used to pass starts to fail
# Go through all versions that may have been skipped to detect
Expand All @@ -25,7 +24,6 @@ timeout:
params:
script: |
ls -la
functions:
"fetch source":
# Executes git clone and applies the submitted patch, if any
Expand Down Expand Up @@ -96,6 +94,7 @@ functions:
export AUTH=${AUTH}
export SSL=${SSL}
export APP_TESTS=${APP_TESTS}
export DOCKER_DISTRO=${DOCKER_DISTRO}
EOT
# See what we've done
cat expansion.yml
Expand Down Expand Up @@ -283,7 +282,7 @@ functions:
DRIVER="${DRIVER}" \
I18N="${I18N}" \
TEST_I18N_FALLBACKS="${TEST_I18N_FALLBACKS}" \
./egos .evergreen/run-tests.sh
./egos .evergreen/run-tests-docker.sh
"fix absolute paths":
- command: shell.exec
Expand Down Expand Up @@ -322,7 +321,6 @@ tasks:
- name: "test"
commands:
- func: "run tests"

axes:
- id: "mongodb-version"
display_name: MongoDB Version
Expand Down Expand Up @@ -351,6 +349,7 @@ axes:
display_name: "MongoDB 3.6"
variables:
VERSION: "3.6"

- id: "topology"
display_name: Topology
values:
Expand All @@ -367,6 +366,7 @@ axes:
variables:
TOPOLOGY: "sharded-cluster"
SINGLE_MONGOS: true

- id: "auth"
display_name: Authentication
values:
Expand All @@ -378,6 +378,7 @@ axes:
display_name: NoAuth
variables:
AUTH: "noauth"

- id: "ssl"
display_name: SSL
values:
Expand All @@ -389,6 +390,7 @@ axes:
display_name: NoSSL
variables:
SSL: "nossl"

- id: "ruby"
display_name: Ruby Version
values:
Expand Down Expand Up @@ -416,6 +418,7 @@ axes:
display_name: ruby-head
variables:
RVM_RUBY: "ruby-head"

- id: "jruby"
display_name: JRuby Version
values:
Expand All @@ -427,24 +430,36 @@ axes:
display_name: jruby-9.3
variables:
RVM_RUBY: "jruby-9.3"

- id: "os"
display_name: OS
values:
- id: ubuntu-16.04
display_name: "Ubuntu 16.04"
run_on: ubuntu1604-small
variables:
DOCKER_DISTRO: ubuntu1604
- id: ubuntu-18.04
display_name: "Ubuntu 18.04"
run_on: ubuntu1804-small
variables:
DOCKER_DISTRO: ubuntu1804
- id: ubuntu-20.04
display_name: "Ubuntu 20.04"
run_on: ubuntu2004-small
variables:
DOCKER_DISTRO: ubuntu2004
- id: rhel70
display_name: "RHEL 7.0"
run_on: rhel70-small
variables:
DOCKER_DISTRO: rhel70
- id: rhel80
display_name: "RHEL 8.0"
run_on: rhel80-small
variables:
DOCKER_DISTRO: rhel80

- id: "driver"
display_name: Driver Version
values:
Expand Down Expand Up @@ -492,6 +507,7 @@ axes:
display_name: "BSON-master"
variables:
DRIVER: "bson-master"

- id: "rails"
display_name: Rails Version
values:
Expand Down Expand Up @@ -519,6 +535,7 @@ axes:
display_name: "Rails 7.0"
variables:
RAILS: "7.0"

- id: "i18n"
display_name: I18n version
values:
Expand All @@ -528,31 +545,31 @@ axes:
I18N: "1.0"
- id: current
display_name: "i18n-current"

- id: "test-i18n-fallbacks"
display_name: Test i18n fallbacks
values:
- id: yes
display_name: "i18n-fallbacks"
variables:
TEST_I18N_FALLBACKS: yes

- id: app-tests
display_name: Mongoid application tests
values:
- id: yes
display_name: Yes
variables:
APP_TESTS: yes

buildvariants:
- matrix_name: "ruby-3.1"
matrix_spec:
ruby: ["ruby-3.1"]
driver: ["current"]
topology: '*'
mongodb-version: ['6.0']
os: ubuntu-20.04
display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}"
run_on:
- ubuntu2004-small
tasks:
- name: "test"

Expand All @@ -562,9 +579,8 @@ buildvariants:
driver: ["current"]
topology: ['replica-set']
mongodb-version: ['5.0']
os: ubuntu-20.04
display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}"
run_on:
- ubuntu2004-small
tasks:
- name: "test"

Expand All @@ -574,9 +590,8 @@ buildvariants:
driver: ["current"]
topology: ['replica-set', 'sharded-cluster']
mongodb-version: '5.0'
os: ubuntu-18.04
display_name: "${jruby}, ${driver}, ${mongodb-version}, ${topology}"
run_on:
- ubuntu1804-small
tasks:
- name: "test"

Expand All @@ -586,9 +601,8 @@ buildvariants:
driver: ["current"]
topology: '*'
mongodb-version: ['4.4']
os: ubuntu-18.04
display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}"
run_on:
- ubuntu1804-small
tasks:
- name: "test"

Expand All @@ -598,9 +612,8 @@ buildvariants:
driver: ["current"]
topology: ['replica-set']
mongodb-version: ['4.0']
os: ubuntu-16.04
display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}"
run_on:
- ubuntu1604-small
tasks:
- name: "test"

Expand All @@ -610,9 +623,8 @@ buildvariants:
driver: ["current"]
topology: ['replica-set']
mongodb-version: ['3.6']
os: ubuntu-16.04
display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}"
run_on:
- ubuntu1604-small
tasks:
- name: "test"

Expand All @@ -622,9 +634,8 @@ buildvariants:
ruby: ["ruby-3.1"]
mongodb-version: "5.0"
topology: ['replica-set', 'sharded-cluster']
os: ubuntu-20.04
display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}"
run_on:
- ubuntu2004-small
tasks:
- name: "test"

Expand All @@ -634,9 +645,8 @@ buildvariants:
ruby: ["ruby-2.5"]
mongodb-version: "4.0"
topology: ['replica-set', 'sharded-cluster']
os: ubuntu-18.04
display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}"
run_on:
- ubuntu1804-small
tasks:
- name: "test"

Expand All @@ -646,9 +656,8 @@ buildvariants:
ruby: ["ruby-2.5"]
mongodb-version: "3.6"
topology: "standalone"
os: ubuntu-16.04
display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}"
run_on:
- ubuntu1604-small
tasks:
- name: "test"

Expand All @@ -659,9 +668,8 @@ buildvariants:
mongodb-version: "5.0"
topology: "standalone"
rails: ['7.0']
os: ubuntu-20.04
display_name: "${rails}, ${driver}, ${mongodb-version}"
run_on:
- ubuntu2004-small
tasks:
- name: "test"

Expand All @@ -671,9 +679,8 @@ buildvariants:
ruby: ["ruby-2.7"]
mongodb-version: "5.0"
topology: "standalone"
os: ubuntu-18.04
display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}"
run_on:
- ubuntu1804-small
tasks:
- name: "test"

Expand All @@ -683,9 +690,8 @@ buildvariants:
ruby: ["ruby-3.0"]
mongodb-version: "5.0"
topology: "standalone"
os: ubuntu-18.04
display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}"
run_on:
- ubuntu1804-small
tasks:
- name: "test"

Expand All @@ -697,9 +703,8 @@ buildvariants:
mongodb-version: "5.0"
topology: "standalone"
rails: ['6.0', '6.1']
os: ubuntu-20.04
display_name: "${rails}, ${driver}, ${mongodb-version}"
run_on:
- ubuntu2004-small
tasks:
- name: "test"

Expand All @@ -710,9 +715,8 @@ buildvariants:
mongodb-version: "4.0"
topology: "standalone"
rails: ['5.1', '5.2']
os: ubuntu-18.04
display_name: "${rails}, ${driver}, ${mongodb-version}"
run_on:
- ubuntu1804-small
tasks:
- name: "test"

Expand All @@ -723,9 +727,8 @@ buildvariants:
mongodb-version: "4.4"
topology: "standalone"
i18n: '1.0'
os: ubuntu-18.04
display_name: "i18n-1.0 ${rails}, ${driver}, ${mongodb-version}"
run_on:
- ubuntu1804-small
tasks:
- name: "test"

Expand All @@ -737,9 +740,8 @@ buildvariants:
topology: "standalone"
i18n: '*'
test-i18n-fallbacks: yes
os: ubuntu-18.04
display_name: "i18n fallbacks ${rails}, ${driver}, ${mongodb-version}, ${i18n}"
run_on:
- ubuntu1804-small
tasks:
- name: "test"

Expand All @@ -751,9 +753,8 @@ buildvariants:
topology: standalone
app-tests: yes
rails: ['6.0', '6.1', '7.0']
os: ubuntu-20.04
display_name: "app tests ${driver}, ${ruby}, ${rails}"
run_on:
- ubuntu2004-small
tasks:
- name: "test"

Expand All @@ -765,9 +766,8 @@ buildvariants:
topology: standalone
app-tests: yes
rails: ['5.1', '5.2']
os: ubuntu-18.04
display_name: "app tests ${driver}, ${ruby}, ${rails}"
run_on:
- ubuntu1804-small
tasks:
- name: "test"

Expand All @@ -779,8 +779,7 @@ buildvariants:
topology: standalone
app-tests: yes
rails: ['6.0']
os: ubuntu-18.04
display_name: "app tests ${driver}, ${jruby}"
run_on:
- ubuntu1804-small
tasks:
- name: "test"
Loading

0 comments on commit 306b019

Please sign in to comment.