From d12516102726a03779d26e88574a77cc01ed26d4 Mon Sep 17 00:00:00 2001 From: Aaron Toth Date: Mon, 4 Apr 2022 22:29:46 -0400 Subject: [PATCH] Run tests in current python versions --- .github/workflows/pythonpackage.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 22f4b61..6f1b459 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -16,7 +16,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [2.7, 3.7] + python-version: ['2.x', '3.x'] env: MYGEOTAB_DATABASE: ${{ secrets.MYGEOTAB_DATABASE }} MYGEOTAB_USERNAME: ${{ secrets.MYGEOTAB_USERNAME }} @@ -42,15 +42,15 @@ jobs: # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide pipenv run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest (Python 3) - if: matrix.python-version >= 3.5 + if: matrix.python-version > 3.5 run: | - pipenv run py.test --cov-config .coveragerc --cov-report xml:output/coverage.xml --cov mygeotab --junitxml output/python-test-results.xml --benchmark-min-rounds=3 --benchmark-storage=file://output/ --benchmark-autosave tests/ + pipenv run py.test --cov-config .coveragerc --cov-report xml:output/coverage.xml --cov mygeotab --junitxml output/python${{ matrix.python-version }}-test-results.xml --benchmark-min-rounds=3 --benchmark-storage=file://output/ --benchmark-autosave tests/ - name: Test with pytest (Python 2) if: matrix.python-version < 3 run: | - pipenv run py.test --ignore-glob='*_async.py' --junitxml output/python-test-results.xml --benchmark-min-rounds=3 --benchmark-storage=file://output/ --benchmark-autosave tests/ + pipenv run py.test --ignore-glob='*_async.py' --junitxml output/python${{ matrix.python-version }}-test-results.xml --benchmark-min-rounds=3 --benchmark-storage=file://output/ --benchmark-autosave tests/ - name: Upload coverage to Codecov - if: matrix.python-version >= 3.5 + if: matrix.python-version >= 3.10 uses: codecov/codecov-action@v1.0.3 with: token: ${{secrets.CODECOV_TOKEN}}