Skip to content

BREAKING CHANGE: Version bump trigger #4

BREAKING CHANGE: Version bump trigger

BREAKING CHANGE: Version bump trigger #4

Workflow file for this run

name: Code quality
on:
push:
branches:
- dev
- main
paths:
- http_csp/**
- pyproject.toml
- poetry.lock
pull_request:
branches:
- dev
- main
paths:
- http_csp/**
- pyproject.toml
- poetry.lock
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Poetry
uses: snok/install-poetry@v1
with:
version: latest
virtualenvs-create: true
virtualenvs-in-project: false
installer-parallel: true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
cache: poetry
- name: Install dependencies
run: poetry install --with dev
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run flake8 . --count --select=E9,F63,F7,F82 \
--show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
poetry run flake8 . --count --exit-zero --max-complexity=10 \
--max-line-length=127 --statistics
- name: Run tests
run: poetry run pytest
- name: Dependencies safety check
run: |
poetry export --without-hashes -f requirements.txt | \
poetry run safety check --full-report --stdin
- name: Create code coverage report
uses: MishaKav/pytest-coverage-comment@main