release: v0.4.0 #139
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python package | |
on: | |
push: | |
branches: | |
- 'master' | |
- 'dev' | |
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.8', '3.9', '3.10', '3.11'] | |
poetry-version: ["1.3.0"] | |
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 coveralls --service=github |