ci-examples/Python/.woodpecker/code-quality.yaml
pat-s 8df9d19ef4 Linters and related fixes (#39)
- Add yamllint
- Add markdownlint
- Add precommit config
- Add editorconfig
- Rename `.yml` to `.yaml`
- Add CI workflow to enforce lint rules

Configs are taken from Woodpecker org lint rules.

Reviewed-on: https://codeberg.org/Codeberg-CI/examples/pulls/39
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Co-committed-by: pat-s <patrick.schratz@gmail.com>
2024-01-31 16:32:05 +00:00

39 lines
1.0 KiB
YAML

# This config shows how to handle Python-CI focusing on code quality
# was taken from https://codeberg.org/sail.black/serial-sphinx/src/branch/main/.woodpecker.yml
# check there for license information
steps:
standardize:
image: python:3.9-buster
when:
event: pull_request
branch: main
commands:
- python -m pip install --upgrade pip
- python -m pip install -r requirements.txt
- python -m pip install pylint flake8 mypy>=0.971
- python -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- mypy --strict serial_sphinx/
- python -m pylint -f parseable serial_sphinx/*.py
build:
image: python:${TAG}-buster
when:
event: pull_request
branch: main
commands:
- ls
- python -m venv venv
- /bin/bash -c "source venv/bin/activate"
- python -m pip install --upgrade pip
- python -m pip install -r requirements.txt
- pytest tests/
matrix:
TAG:
- 3.7
- 3.9
- 3.8
- 3.10