Repository navigation
74 lines (63 loc) · 2.31 KB
/
Copy pathci.yml
File metadata and controls
74 lines (63 loc) · 2.31 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: ci
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
# A newer push to the same pull request supersedes the run in progress; runs on
# main always finish, so every merged commit keeps its result.
concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
# Required check for Renovate's auto-merge: a dependency PR merges only when
# every step passes on both systems. The commands are the README's
# "Verifying the skill itself" list, plus the pass-through checker, the type
# checkers, and pip-audit.
verify:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
defaults:
run:
shell: bash
working-directory: python-code-standards
env:
SOURCES: skill/tools skill/assets/conformance.py tests evals/grade.py evals/design_spec_grade.py
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
# Pinned so a uv release reaches CI only through a Renovate PR, after minimumReleaseAge.
version: 0.13.7
enable-cache: true
- name: Sync the environment from uv.lock
run: uv sync --locked
- name: Tests and coverage
run: uv run pytest --cov=skill.tools --cov=evals.grade --cov=evals.design_spec_grade --cov-branch
# evals/fixtures/ is deliberately non-conforming, so it is not listed.
- name: Lint and format
run: |
uv run ruff check $SOURCES
uv run ruff format --check $SOURCES
- name: Declarations, pass-throughs, and complexity
run: |
uv run python skill/tools/check_declarations.py $SOURCES
uv run python skill/tools/check_passthrough.py $SOURCES
uv run complexipy skill/tools tests evals/grade.py evals/design_spec_grade.py
- name: Type checkers
run: |
uv run pyright
uv run mypy $SOURCES
- name: Dependencies
run: |
uv run deptry .
uv run pip-audit