diff --git a/.github/workflows/test_tox.yml b/.github/workflows/test_tox.yml new file mode 100644 index 0000000000..1ff189a6f4 --- /dev/null +++ b/.github/workflows/test_tox.yml @@ -0,0 +1,43 @@ +name: Test 0 + +on: + push: + branches-ignore: + - 'release/*' + pull_request: + +env: + CORE_REPO_SHA: main + CONTRIB_REPO_SHA: main + PIP_EXISTS_ACTION: w + +jobs: + test: + name: ${{ matrix.python-version }}-${{ matrix.os }} + runs-on: ${{ matrix.os }} + env: + py38: "3.8" + py39: "3.9" + py310: "3.10" + py311: "3.11" + py312: "3.12" + pypy3: pypy-3.8 + strategy: + fail-fast: false + matrix: + python-version: [py38, py39, py310, py311, py312, pypy3] + os: [ubuntu-latest, windows-latest] + steps: + - name: Checkout repo @ SHA - ${{ github.sha }} + uses: actions/checkout@v4 + - name: Set up Python ${{ env[matrix.python-version] }} + uses: actions/setup-python@v5 + with: + python-version: ${{ env[matrix.python-version] }} + architecture: 'x64' + - name: Install tox + run: pip install tox tox-uv tox-gh + - name: Run tests + run: tox run --skip-pkg-install + env: + TOX_GH_MAJOR_MINOR: ${{ env[matrix.python-version] }} diff --git a/tox.ini b/tox.ini index 3e92195f9d..836054988e 100644 --- a/tox.ini +++ b/tox.ini @@ -364,3 +364,12 @@ deps = pre-commit commands = pre-commit run --color=always --all-files {posargs} + +[gh] +python = + 3.12 = py312-test + 3.11 = py311-test + 3.10 = py310-test + 3.9 = py39-test + 3.8 = py38-test + pypy3 = pypy3-test