File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,7 @@ def run(opts):
178
178
expansion_yaml .unlink (missing_ok = True )
179
179
expansion_sh = Path ("mo-expansion.sh" )
180
180
expansion_sh .unlink (missing_ok = True )
181
+ uri_txt = DRIVERS_TOOLS / "uri.txt"
181
182
182
183
# The evergreen directory to path.
183
184
os .environ ["PATH" ] = f"{ EVG_PATH } :{ os .environ ['PATH' ]} "
@@ -298,6 +299,7 @@ def run(opts):
298
299
# Handle the cluster uri.
299
300
uri = resp .get ("mongodb_auth_uri" , resp ["mongodb_uri" ])
300
301
expansion_yaml .write_text (expansion_yaml .read_text () + f"\n MONGODB_URI: { uri } " )
302
+ uri_txt .write_text (uri )
301
303
LOGGER .info (f"Cluster URI: { uri } " )
302
304
303
305
# Write the results file.
Original file line number Diff line number Diff line change 8
8
branches :
9
9
- " master"
10
10
11
+ concurrency :
12
+ group : tests-${{ github.ref }}
13
+ cancel-in-progress : true
14
+
15
+ defaults :
16
+ run :
17
+ shell : bash -eux {0}
18
+
11
19
jobs :
12
20
tests :
13
21
name : " Tests"
@@ -41,14 +49,25 @@ jobs:
41
49
fetch-depth : 2
42
50
43
51
- id : setup-mongodb
44
- name : " Test GitHub Action"
52
+ name : " Run GitHub Action"
45
53
uses : ./
46
54
with :
47
55
version : ${{ matrix.mongodb-version }}
48
56
topology : ${{ matrix.topology }}
49
57
auth : ${{ matrix.auth }}
50
58
ssl : ${{ matrix.ssl }}
51
59
60
+ - id : test-mongodb
61
+ name : " Test GitHub Action"
62
+ run : |
63
+ chmod +x mongodb/bin/mongosh
64
+ URI=$(cat uri.txt)
65
+ ARGS=""
66
+ if [ ${{ matrix.ssl }} == "ssl" ]; then
67
+ ARGS="--tls --tlsCertificateKeyFile $(pwd)/.evergreen/x509gen/client.pem --tlsCAFile $(pwd)/.evergreen/x509gen/ca.pem"
68
+ fi
69
+ mongodb/bin/mongosh $URI $ARGS --eval "db.runCommand({ ping: 1 })"
70
+
52
71
pre-commit :
53
72
runs-on : ubuntu-latest
54
73
steps :
You can’t perform that action at this time.
0 commit comments