Skip to content

Commit

Permalink
Merge pull request #136 from pybitcash/pin-pytest
Browse files Browse the repository at this point in the history
Pin pytest and coverage versions
  • Loading branch information
merc1er authored Apr 10, 2024
2 parents b612c59 + 8ec0c61 commit 7190eab
Showing 1 changed file with 31 additions and 30 deletions.
61 changes: 31 additions & 30 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,38 @@ 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@v2
with:
file: ./coverage.xml
name: codecov-umbrella
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- 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') }}

0 comments on commit 7190eab

Please sign in to comment.