Skip to content

Merge pull request #343 from MSeifert04/new_version #407

Merge pull request #343 from MSeifert04/new_version

Merge pull request #343 from MSeifert04/new_version #407

name: Coverage (CPython)
on:
pull_request:
branches:
- '*'
push:
branches:
- master
jobs:
coverage:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- name: Check out source
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install pip setuptools --upgrade
- name: Install package
run: |
CFLAGS="-coverage" python -m pip install .
- name: Install test dependencies
run: |
python -m pip install pytest pytest-cov
- name: Run tests
run: |
python -m pytest tests/ --cov=iteration_utilities --cov-report=xml --cov-config=./pyproject.toml
- name: Upload Coverage report
# It would probably be better to use the codecov-action but that's very slow:
# https://github.com/codecov/codecov-action/issues/21
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
curl -s https://codecov.io/bash | bash -s -- -t $CODECOV_TOKEN -F unittests -n ubuntu-${{ matrix.python-version }}