forked from Project-N-E-K-O/N.E.K.O
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.54 KB
/
analyze.yml
File metadata and controls
49 lines (40 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Analyze
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
# Static-check job only needs to read the checked-out source.
permissions:
contents: read
jobs:
python-lint:
name: Python lint (ruff + async-blocking + no-loguru)
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Install ruff
# ruff is the only dev dep we need for the lint job; a full uv sync
# pulls heavy native extensions (playwright, numpy, etc.) that are
# unnecessary for static checks.
run: uv tool install ruff==0.15.4
- name: ruff check (incl. ASYNC210/220/221/222/251)
run: ruff check .
- name: Forbid blocking calls in async def bodies
# Custom AST checker — covers the gaps flake8-async doesn't:
# Thread/Process.join, queue.Queue.get, raw socket recv/accept/connect.
run: python scripts/check_async_blocking.py
- name: Forbid loguru / structlog / logbook imports
# Logging is unified through utils.logger_config (RobustLoggerConfig).
# Re-introducing a third-party logging frontend fragments the surface
# (formatter, sinks, file naming, multi-process behaviour) and breaks
# plugin/main parity. This check fails the build on any such import.
run: python scripts/check_no_loguru.py