lkeep/.gitea/workflows/lint.yaml
proDream 753834e7b5
Some checks failed
Lint project / lint (push) Failing after 2m23s
feat: добавлены файлы конфигурации линтеров и GitHub Actions для проверки кода
- Создан файл `.gitea/workflows/lint.yaml` для настройки проверок в Gitea.
- Добавлен файл `.pre-commit-config.yaml` с конфигурацией pre-commit hooks.
- Создан файл `.github/workflows/lint.yaml` для линтинга кода при push в GitHub.
2025-01-10 02:25:20 +04:00

55 lines
1.4 KiB
YAML

name: Lint project
on:
push:
jobs:
lint:
env:
RUNNER_TOOL_CACHE: /opt/hostedtoolcache
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: 'pip'
env:
AGENT_TOOLSDIRECTORY: /opt/hostedtoolcache
- name: Cache pre-commit hooks
id: cache-pre-commit
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-pre-commit-cache
restore-keys: |
${{ runner.os }}-pre-commit-cache
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
poetry run pre-commit install
- name: Lint pre-commit
run: poetry run pre-commit run --all-files --hook-stage manual
- name: Run Telegram Notify Action
uses: proDreams/actions-telegram-notifier@v1
if: always()
with:
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
chat_id: ${{ secrets.TELEGRAM_CHAT_ID }}
status: ${{ job.status }}
message: "Gitea Lkeep Lint"
notify_fields: "actor,repository,workflow"