Skip to content

Commit

Permalink
CI: Fix MongoDB tests
Browse files Browse the repository at this point in the history
`testcontainers-mongodb` needs to be pulled into a separate extra,
because it would otherwise pull in `pymongo` all the time, which in turn
would signal corresponding tests to be invoked.

However, the MongoDB service is not available on all CI workflows, so
things go south.

How could this ever have worked?
  • Loading branch information
amotl committed Jul 5, 2024
1 parent 9b4a279 commit 8bbbaff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/mongodb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
pip install "setuptools>=64" --upgrade
# Install package in editable mode.
pip install --use-pep517 --prefer-binary --editable=.[mongodb,test,develop]
pip install --use-pep517 --prefer-binary --editable=.[mongodb,test-mongodb,develop]
- name: Downgrade pymongo on MongoDB 2
if: matrix.mongodb-version == '2'
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ test = [
"responses<0.26",
"testcontainers-azurite==0.0.1rc1",
"testcontainers-minio==0.0.1rc1",
]
test-mongodb = [
"cratedb-toolkit[test]",
"testcontainers-mongodb==0.0.1rc1",
]
testing = [
Expand Down

0 comments on commit 8bbbaff

Please sign in to comment.