Repository navigation
65 lines (61 loc) · 2.3 KB
/
Copy pathci.yml
File metadata and controls
65 lines (61 loc) · 2.3 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
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v7
- run: uv sync --locked
- run: uv run ruff format --check src tests scripts examples
- run: uv run ruff check src tests scripts examples
- run: uv run mypy src
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_PASSWORD: graphlock
ports: ["5432:5432"]
options: >-
--health-cmd pg_isready --health-interval 5s --health-timeout 5s --health-retries 10
env:
GRAPHLOCK_TEST_POSTGRES: postgresql://postgres:graphlock@localhost:5432/postgres
HYPOTHESIS_PROFILE: ci
strategy:
fail-fast: false
matrix:
python: ["3.10", "3.12", "3.14"]
langgraph: ["1.0.0", "latest"]
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v7
- name: Test against LangGraph ${{ matrix.langgraph }}
run: |
if [ "${{ matrix.langgraph }}" = "latest" ]; then pin="langgraph"; aio="aiosqlite"; else pin="langgraph==${{ matrix.langgraph }}"; aio="aiosqlite<0.22"; fi
uv run --isolated -p ${{ matrix.python }} --with "$pin" --with langgraph-checkpoint-sqlite --with langgraph-checkpoint-postgres --with "psycopg[binary]" --with "$aio" --with pytest --with hypothesis --with-editable . pytest -q
- name: Evidence table (what LangGraph does today)
if: matrix.langgraph == 'latest' && matrix.python == '3.12'
run: uv run --isolated -p 3.12 --with langgraph --with langgraph-checkpoint-sqlite --with-editable . python scripts/evidence.py >> "$GITHUB_STEP_SUMMARY"
action:
# The Action on the refund example: lock the deployed graph, then check the pull request's.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- uses: ./
with:
working-directory: examples/refunds
install: pip install langgraph-checkpoint-sqlite
args: lock --graph refunds=refunds_v1:graph
- uses: ./
with:
working-directory: examples/refunds
install: ""
args: check --format github