-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (56 loc) · 1.75 KB
/
Copy pathci.yml
File metadata and controls
61 lines (56 loc) · 1.75 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
name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: test (py${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v9.0.0
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Install (all extras)
run: uv sync --all-extras
- name: Lint (ruff)
run: uv run ruff check src tests scripts
- name: Type check (mypy --strict)
if: matrix.python-version == '3.12'
run: uv run mypy
- name: Unit tests
run: uv run pytest -q
test-core-py39:
name: test (py3.9, core only)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v9.0.0
with:
python-version: "3.9"
enable-cache: true
# langchain-openai is gated python_version>='3.10', so it's skipped on 3.9 and its tests no-op.
- name: Install (dev extras; langchain skipped on 3.9)
run: uv sync --extra dev
- name: Lint (ruff)
run: uv run ruff check src tests scripts
- name: Unit tests
run: uv run pytest -q
secret-scan:
name: secret scan (gitleaks)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Scan working tree for leaked tokens/secrets
run: |
curl -sSfL "https://github.com/gitleaks/gitleaks/releases/download/v8.21.2/gitleaks_8.21.2_linux_x64.tar.gz" | tar -xz gitleaks
./gitleaks dir . --redact --no-banner