diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 88fc3907..547fde69 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -6,37 +6,37 @@ jobs: test: environment: actions strategy: - fail-fast: false # still run the other versions of Python if one fails + fail-fast: false # still run the other versions of Python if one fails matrix: python: [3.8, 3.9, "3.10", 3.11] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Install coverage and pytest - run: pip install coverage pytest - - name: Run tests - run: | - coverage run -m pytest -m "not regtest" -rw - coverage xml - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 - with: - file: ./coverage.xml - name: codecov-umbrella - fail_ci_if_error: true - - name: Publish to PyPI - uses: casperdcl/deploy-pypi@v2 - if: ${{ matrix.python == 3.9 }} - with: - password: ${{ secrets.PYPI_TOKEN }} - pip: wheel -w dist/ --no-deps . - # only upload if a tag is pushed (otherwise just build & check) - upload: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') }} + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Install coverage and pytest + run: pip install coverage==7.4.4 pytest==7.4.4 + - name: Run tests + run: | + coverage run -m pytest -m "not regtest" -rw + coverage xml + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + file: ./coverage.xml + name: codecov-umbrella + fail_ci_if_error: true + - name: Publish to PyPI + uses: casperdcl/deploy-pypi@v2 + if: ${{ matrix.python == 3.9 }} + with: + password: ${{ secrets.PYPI_TOKEN }} + pip: wheel -w dist/ --no-deps . + # only upload if a tag is pushed (otherwise just build & check) + upload: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') }}