From 5371e22a0249e1703c9e5f12ee95cae6743e2142 Mon Sep 17 00:00:00 2001 From: Yun Zheng Hu Date: Thu, 24 Aug 2023 10:05:52 +0000 Subject: [PATCH] Add GitHub workflow to test on Python 3.7 and 3.8 --- .github/workflows/compatibility.yml | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/compatibility.yml diff --git a/.github/workflows/compatibility.yml b/.github/workflows/compatibility.yml new file mode 100644 index 0000000..46b2dba --- /dev/null +++ b/.github/workflows/compatibility.yml @@ -0,0 +1,36 @@ +name: Extra Python Compatibility tests +on: [push, pull_request, workflow_dispatch] + +jobs: + test-py37-py38: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.7", "3.8"] + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + lfs: true + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: "pip" + cache-dependency-path: "pyproject.toml" + - run: pip install "tox==4.2.4" + - if: ${{ github.ref_name == 'main' }} + run: sed -i 's/\[tool.setuptools_scm\]/\[tool.setuptools_scm\]\nlocal_scheme = "no-local-version"/' pyproject.toml + - env: + C_INCLUDE_PATH: ${{ env.pythonLocation }}/include/${{ matrix.python-include }} + run: tox run -e ${{ matrix.tox-env }} + - uses: codecov/codecov-action@v3 + with: + env_vars: PYTHON + files: coverage.xml + flags: unittests + verbose: true + - uses: actions/upload-artifact@v3 + with: + name: coverage + path: coverage.xml \ No newline at end of file