Repository navigation
64 lines (52 loc) · 1.46 KB
/
Copy pathci.yml
File metadata and controls
64 lines (52 loc) · 1.46 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
name: CI
# Lint + test the API/MCP package (src/idc_api, tests). No GCP or credentials needed; the
# first test run downloads the specialized idc-index parquet (IDC_API_INCLUDE_INDICES=all
# by default).
on:
workflow_dispatch:
push:
branches: [main]
paths:
- "src/idc_api/**"
- "tests/**"
- "pyproject.toml"
- "uv.lock"
- ".github/workflows/ci.yml"
pull_request:
paths:
- "src/idc_api/**"
- "tests/**"
- "pyproject.toml"
- "uv.lock"
- ".github/workflows/ci.yml"
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v7
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- name: Install (locked deps + dev extras)
run: uv sync --locked --extra dev --python ${{ matrix.python-version }}
- name: Lint (ruff)
run: uv run ruff check src tests
- name: Format (ruff)
run: uv run ruff format --check src tests
- name: Security lint (bandit)
run: uv run bandit -q -r src/idc_api
- name: Dependency vulnerability scan (pip-audit)
run: uv run pip-audit
- name: Test (pytest)
run: uv run pytest tests -q