Skip to content

Test support for PyMongo 4.0 #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Dec 10, 2021
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ jobs:
matrix:
python-version: ["3.5", "3.6", "3.7", "3.8", "pypy-3.7"]
mongodb-version: ["4.4"]
pymongo-version: ["3.11.0", "4.0.0"]
# pymongo 4.0 does not support python 3.5
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you file a new issue to drop support for 3.5 if one doesn't exist already?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

exclude:
- python-version: "3.5"
pymongo-version: "4.0.0"

steps:
- uses: actions/checkout@v2
Expand All @@ -20,8 +25,15 @@ jobs:
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongodb-version }}
# add caching to reduce bandwidth and save time
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ matrix.python-version}}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version}}-pip-
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed? How much time are we saving? IIRC these tests run very fast already.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests do already run fast. I mainly added this in because Steve suggested it and I thought it would be an easy way to make it run a bit faster.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay and what is the impact of this change?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a general thing that we add to the Jupyter repos to save time and bandwidth to pypi.org. If we don't want it here that's fine too.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I get that, I just want to know how much time was actully saved in our case. How slow were the old tests and how much quicker are they now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case I see about 40s -> 30s on the Python 3.8 builds.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks SGTM!

- name: Test with python
run: |
python -m pip install pymongo==3.11.0
python -m pip install pymongo==${{ matrix.pymongo-version }}
python -m pip install -e .
python setup.py test
Loading