1- name : " Linting "
1+ name : Audit
22
33on :
4- push :
5- branches :
6- - master
7- - main
8- paths :
9- - " .github/workflows/linting.yml"
10- - " aiogram_bot_template/**"
11- - " pyproject.toml"
124 pull_request :
5+ types : [opened, edited, synchronize, reopened]
6+ branches :
7+ - ' main'
8+ - ' master'
9+ push :
1310 branches :
14- - master
15- - main
16- paths :
17- - " .github/workflows/linting.yml"
18- - " aiogram_bot_template/**"
19- - " pyproject.toml"
11+ - ' main'
12+ - ' master'
13+
14+ run-name : audit - ${{ github.sha }}
2015
2116jobs :
2217 build :
23- strategy :
24- fail-fast : false
25-
2618 defaults :
2719 run :
2820 shell : bash
@@ -34,23 +26,40 @@ jobs:
3426 uses : actions/checkout@v4
3527
3628 - name : Install poetry
37- run : pip install poetry
29+ run : pipx install poetry
3830
39- - name : Set up Python 3.10 on ubuntu-latest
40- uses : actions/setup-python@v5
31+ - uses : actions/setup-python@v5
4132 with :
4233 python-version : ' 3.10'
43- cache : " poetry"
34+ cache : ' poetry'
4435 cache-dependency-path : poetry.lock
4536
46- - name : Install project dependencies
47- run : poetry install --with dev
37+ - name : Check pyproject.toml
38+ id : check_pyproject
39+ run : |
40+ poetry check --lock --strict
41+
42+ - name : Install dependencies
43+ id : install_deps
44+ run : |
45+ poetry sync --with dev
4846
4947 - name : Ruff check
5048 run : poetry run python -m ruff check aiogram_bot_template --config pyproject.toml --output-format=github
49+
5150 - name : Mypy check
5251 run : poetry run python -m mypy aiogram_bot_template --config-file pyproject.toml
52+
5353 - name : Black check
5454 run : poetry run python -m black --check --diff aiogram_bot_template --config pyproject.toml
55+
5556 - name : Isort check
5657 run : poetry run python -m isort --check aiogram_bot_template
58+
59+ - name : Audit dependencies PyPI
60+ id : audit_deps_pypi
61+ run : poetry run pip-audit -r <(poetry export -f requirements.txt --with dev --without-hashes) --vulnerability-service pypi --progress-spinner on
62+
63+ - name : Audit dependencies OSV
64+ id : audit_deps_osv
65+ run : poetry run pip-audit -r <(poetry export -f requirements.txt --with dev --without-hashes) --vulnerability-service osv --progress-spinner on
0 commit comments