Skip to content

Ping

Ping #280

name: Testing and Coverage
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["2.7", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest
run: |
pip install pytest
pip install pytest-cov
pytest --doctest-modules --cov=steppyngstounes --cov-report=xml --cov-report=html --cov-report=term
- name: Upload pytest test results
uses: actions/upload-artifact@v3
with:
name: pytest-results-${{ matrix.python-version }}
path: |
junit/test-results.xml
htmlcov
coverage.xml
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}