Skip to content

Commit 6a36864

Browse files
author
Johannes Otepka
committed
mongodb installation added to github actions
1 parent 5762cd6 commit 6a36864

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,23 @@ jobs:
128128
pip install distributed joblib
129129
pip install --only-binary :all: matplotlib
130130
131+
- name: Start MongoDB
132+
if: ${{ ! matrix.runs_on }} # only under linux/ubuntu
133+
uses: supercharge/mongodb-github-action@1.12.1 # uses latest mongodb per default
134+
135+
- name: Install pymongo package
136+
if: ${{ ! matrix.runs_on }} # only under linux/ubuntu
137+
run: pip install pymongo
138+
139+
- name: Try to connect to mongodb
140+
if: ${{ ! matrix.runs_on }} # only under linux/ubuntu
141+
run: |
142+
python3 <<EOF
143+
from pymongo import MongoClient
144+
client = MongoClient('mongodb://localhost:27017/',serverSelectionTimeoutMS=1)
145+
print(client.server_info())
146+
EOF
147+
131148
- name: Show environment
132149
run: pip freeze
133150

0 commit comments

Comments
 (0)