@@ -134,6 +134,24 @@ functions:
134
134
MONGODB_API_VERSION="${MONGODB_API_VERSION}" \
135
135
NODE_VERSION=${NODE_VERSION} SKIP_DEPS=${SKIP_DEPS|1} NO_EXIT=${NO_EXIT|1} \
136
136
bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
137
+ run serverless tests :
138
+ - command : timeout.update
139
+ params :
140
+ exec_timeout_secs : 1800
141
+ - command : shell.exec
142
+ type : test
143
+ params :
144
+ working_dir : src
145
+ script : |
146
+ ${PREPARE_SHELL}
147
+ # Disable xtrace (just in case it was accidentally set).
148
+ set +x
149
+ MONGODB_URI="${MONGODB_URI}" \
150
+ MONGODB_API_VERSION="${MONGODB_API_VERSION}" \
151
+ AUTH="auth" SSL="ssl" SERVERLESS=1 \
152
+ SERVERLESS_ATLAS_USER="${SERVERLESS_ATLAS_USER}" \
153
+ SERVERLESS_ATLAS_PASSWORD="${SERVERLESS_ATLAS_PASSWORD}" \
154
+ bash ${PROJECT_DIRECTORY}/.evergreen/run-serverless-tests.sh
137
155
start-load-balancer :
138
156
- command : shell.exec
139
157
params :
@@ -605,18 +623,12 @@ functions:
605
623
- command : attach.xunit_results
606
624
params :
607
625
file : src/xunit.xml
608
- pre :
609
- - func : fetch source
610
- - func : prepare resources
611
- - func : windows fix
612
- - func : fix absolute paths
613
- - func : make files executable
614
- post :
615
- - func : upload test results
616
- - func : cleanup
617
- ignore :
618
- - ' *.md'
619
626
tasks :
627
+ - name : test-serverless
628
+ tags :
629
+ - serverless
630
+ commands :
631
+ - func : run serverless tests
620
632
- name : test-latest-server
621
633
tags :
622
634
- latest
@@ -1689,6 +1701,51 @@ tasks:
1689
1701
- func : run bson-ext test
1690
1702
vars :
1691
1703
NODE_LTS_NAME : erbium
1704
+ task_groups :
1705
+ - name : serverless_task_group
1706
+ setup_group_can_fail_task : true
1707
+ setup_group_timeout_secs : 1800
1708
+ setup_group :
1709
+ - func : fetch source
1710
+ - func : prepare resources
1711
+ - command : shell.exec
1712
+ params :
1713
+ shell : bash
1714
+ script : |
1715
+ ${PREPARE_SHELL}
1716
+ set +o xtrace
1717
+ SERVERLESS_DRIVERS_GROUP=${SERVERLESS_DRIVERS_GROUP} \
1718
+ SERVERLESS_API_PUBLIC_KEY=${SERVERLESS_API_PUBLIC_KEY} \
1719
+ SERVERLESS_API_PRIVATE_KEY=${SERVERLESS_API_PRIVATE_KEY} \
1720
+ bash ${DRIVERS_TOOLS}/.evergreen/serverless/create-instance.sh
1721
+ - command : expansions.update
1722
+ params :
1723
+ file : serverless-expansion.yml
1724
+ teardown_group :
1725
+ - func : upload test results
1726
+ - command : shell.exec
1727
+ params :
1728
+ script : |
1729
+ ${PREPARE_SHELL}
1730
+ set +o xtrace
1731
+ SERVERLESS_DRIVERS_GROUP=${SERVERLESS_DRIVERS_GROUP} \
1732
+ SERVERLESS_API_PUBLIC_KEY=${SERVERLESS_API_PUBLIC_KEY} \
1733
+ SERVERLESS_API_PRIVATE_KEY=${SERVERLESS_API_PRIVATE_KEY} \
1734
+ SERVERLESS_INSTANCE_NAME=${SERVERLESS_INSTANCE_NAME} \
1735
+ bash ${DRIVERS_TOOLS}/.evergreen/serverless/delete-instance.sh
1736
+ tasks :
1737
+ - .serverless
1738
+ pre :
1739
+ - func : fetch source
1740
+ - func : prepare resources
1741
+ - func : windows fix
1742
+ - func : fix absolute paths
1743
+ - func : make files executable
1744
+ post :
1745
+ - func : upload test results
1746
+ - func : cleanup
1747
+ ignore :
1748
+ - ' *.md'
1692
1749
buildvariants :
1693
1750
- name : macos-1014-erbium
1694
1751
display_name : macOS 10.14 Node Erbium
@@ -1975,3 +2032,10 @@ buildvariants:
1975
2032
- aws-4.4-auth-test-run-aws-auth-test-with-aws-credentials-as-environment-variables
1976
2033
- aws-4.4-auth-test-run-aws-auth-test-with-aws-credentials-and-session-token-as-environment-variables
1977
2034
- aws-4.4-auth-test-run-aws-ECS-auth-test
2035
+ - name : ubuntu1804-test-serverless
2036
+ display_name : Serverless Test
2037
+ run_on : ubuntu1804-test
2038
+ expansions :
2039
+ NODE_LTS_NAME : erbium
2040
+ tasks :
2041
+ - serverless_task_group
0 commit comments