Skip to content

Commit

Permalink
run all tox envs in gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dill0wn committed Aug 1, 2024
1 parent eed990b commit 55df170
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
- '3.11'
- '3.12'
- pypy3.9
pymongo-version:
- pymongo3
- pymongo4

services:
mongodb:
Expand All @@ -41,7 +44,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python-version }}-${{ matrix.mongo-version }}
allow-prereleases: true

- name: Install dependencies
Expand All @@ -52,7 +55,9 @@ jobs:
- name: Run tox targets for ${{ matrix.python-version }}
# sed is used to remove the '.' so '3.7' becomes '37' for tox (and pypy3 doesn't become pypypy3)
# and drop the '-dev' from any prerelease version
run: tox --skip-missing-interpreters false -e py`echo ${{ matrix.python-version }} | sed s/\\\.// | sed s/pypy/py/ | sed s/-dev//`
run: |
export PY_VER=`echo ${{ matrix.python-version }} | sed s/\\\.// | sed s/pypy/py/ | sed s/-dev//`
tox --skip-missing-interpreters false -e "py$PY_VER-${{ matrix.pymongo-version }}"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
skip_missing_interpreters = True
envlist =
py{38,39,310,311,312}-pymongo{3,4},pypy3
py{38,39,310,311,312}-pymongo{3,4},pypy3-pymongo{3,4}

[testenv]
install_command = pip install {opts} {packages}
Expand Down

0 comments on commit 55df170

Please sign in to comment.