Files
Adrien ce671f4b10
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
🐛 Enable virtual env before running poetry
2024-02-14 23:28:49 +01:00

34 lines
1.0 KiB
YAML

when:
- event: pull_request
branch:
exclude: [master, release/*]
steps:
- name: prepare
image: python:3.12-alpine
commands: |
cd ./backend
python3 -m venv local
wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s latest -b ./local/bin/
source ./local/bin/activate
pip install poetry
poetry install --only=linters --no-root
- name: ruff
image: python:3.12-alpine
failure: ignore
secrets: ["reviewdog_gitea_api_token", "gitea_address"]
commands: |
cd ./backend
source ./local/bin/activate
poetry run ruff --output-format sarif . | ./local/bin/reviewdog -f sarif -reporter gitea-pr-review -filter-mode nofilter
- name: mypy
image: python:3.12-alpine
failure: ignore
secrets: ["reviewdog_gitea_api_token", "gitea_address"]
commands: |
cd ./backend
source ./local/bin/activate
poetry run mypy --no-incremental . | ./local/bin/reviewdog -f mypy -reporter gitea-pr-review -filter-mode nofilter