-
Notifications
You must be signed in to change notification settings - Fork 2
106 lines (86 loc) · 2.99 KB
/
Copy pathci.yml
File metadata and controls
106 lines (86 loc) · 2.99 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
lint:
name: Lint and type-check
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
enable-cache: true
python-version: "3.10"
- name: Sync dependencies
run: uv sync
- name: Ruff (lint)
run: uv run ruff check .
- name: Ruff (format check)
run: uv run ruff format --check .
- name: Mypy
run: uv run mypy
- name: Deptry (langgraph-checkpoint-aerospike)
run: uv run deptry packages/langgraph-checkpoint-aerospike --config packages/langgraph-checkpoint-aerospike/pyproject.toml
- name: Deptry (langgraph-store-aerospike)
run: uv run deptry packages/langgraph-store-aerospike --config packages/langgraph-store-aerospike/pyproject.toml
test:
name: Tests (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.13"]
services:
aerospike:
image: aerospike/aerospike-server:8.1
ports:
- 3000:3000
# The CE image ships with default-ttl=0, which disables nsup and makes
# the server reject any write that carries a TTL. Our tests always pass
# a TTL, so enable nsup by setting a non-zero default-ttl here.
env:
DEFAULT_TTL: 30d
env:
AEROSPIKE_HOST: localhost
AEROSPIKE_PORT: "3000"
AEROSPIKE_NAMESPACE: test
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install uv (and Python ${{ matrix.python-version }})
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- name: Sync dependencies
run: uv sync
- name: Wait for Aerospike to accept connections
run: |
for i in $(seq 1 30); do
if (echo > /dev/tcp/127.0.0.1/3000) >/dev/null 2>&1; then
echo "Aerospike is reachable on port 3000"
exit 0
fi
echo "Waiting for Aerospike... ($i/30)"
sleep 1
done
echo "Aerospike never became reachable"
exit 1
- name: Run tests
run: uv run pytest -v