-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (46 loc) · 1.21 KB
/
Copy pathci.yml
File metadata and controls
51 lines (46 loc) · 1.21 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
50
51
name: CI
on:
push:
branches: [master]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint (ruff)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v8.3.2
with:
python-version: "3.12"
enable-cache: true
- run: uv sync --extra webgui
- run: uv run ruff check .
- run: uv run ruff format --check .
typecheck:
name: Type check (mypy --strict)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v8.3.2
with:
python-version: "3.12"
enable-cache: true
- run: uv sync --extra webgui
- run: uv run mypy src/
test:
name: Tests (pytest, coverage ≥ 80%)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v8.3.2
with:
python-version: "3.12"
enable-cache: true
- run: uv sync --extra webgui
- run: >
uv run --with pytest-cov pytest --tb=short -q
--cov=bot --cov=webgui --cov-report=term-missing:skip-covered
--cov-fail-under=80