Skip to content

Test and Upload Coverage #5

Test and Upload Coverage

Test and Upload Coverage #5

Workflow file for this run

# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Test and Upload Coverage
on:
workflow_dispatch:
env:
test-requires: "[test,extra]"
test-dir: test
pytest-args: >-
-rap
--durations=20
--verbose
jobs:
tests-pip:
name: Tests (pip, Python ${{ matrix.python-version }}, ${{ matrix.os }}) and Upload Coverage
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest" ]
python-version: [ "3.8" ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade wheel setuptools
pip install ".${{ env.test-requires }}"
- name: Run tests
run: |
pytest ${{ env.pytest-args }} ${{ env.test-dir }}
- name: Upload coverage reports to Codecov with GitHub Action
# if: ${{ runner.os == 'Linux' && matrix.python-version == 3.8 }}
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}