From 55df170eb4825c81cfde43370187c7c28e044848 Mon Sep 17 00:00:00 2001 From: Dillon Walls Date: Thu, 1 Aug 2024 18:01:48 +0000 Subject: [PATCH] run all tox envs in gh actions --- .github/workflows/main.yml | 9 +++++++-- tox.ini | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9e0ff61..9bd1a01 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,6 +28,9 @@ jobs: - '3.11' - '3.12' - pypy3.9 + pymongo-version: + - pymongo3 + - pymongo4 services: mongodb: @@ -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 @@ -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 diff --git a/tox.ini b/tox.ini index 7a47419..c1a8ea7 100644 --- a/tox.ini +++ b/tox.ini @@ -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}