Skip to content

fix: coverage report #151

fix: coverage report

fix: coverage report #151

Workflow file for this run

name: Python package
on:
push:
branches:
- 'master'
- 'devel'
paths:
- catflow/**
- tests/**
- .github/workflows/ci.yml
- pyproject.toml
- poetry.lock
pull_request:
paths:
- catflow/**
- tests/**
- .github/workflows/ci.yml
- pyproject.toml
- poetry.lock
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
poetry-version: ["1.6.1"]
steps:
- uses: actions/checkout@v2
- name: Install OS dependencies
run: |
sudo apt-get update -yy
sudo apt-get install -yy \
msttcorefonts
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: poetry install --no-interaction --without docs
- name: Lint with flake8
run: |
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
poetry run coverage run --source=./catflow -m pytest -v tests/
poetry run coverage report
poetry run coverage xml
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: chenggroup/catflow