-
Notifications
You must be signed in to change notification settings - Fork 1
87 lines (76 loc) · 2.49 KB
/
Copy pathci.yml
File metadata and controls
87 lines (76 loc) · 2.49 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.11"
- name: Install dev deps
run: |
python -m pip install --upgrade pip
pip install "ruff==0.9.2" mypy
pip install -e .
- name: Ruff format check
run: ruff format --check .
- name: Ruff lint
run: ruff check .
- name: Mypy
run: mypy src/openai_agents_aerospike
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
services:
aerospike:
image: aerospike/aerospike-server:latest
ports:
- 3000:3000
- 3001:3001
- 3002:3002
options: >-
--health-cmd "asinfo -v build || exit 1"
--health-interval 5s
--health-timeout 5s
--health-retries 12
env:
AEROSPIKE_HOST: 127.0.0.1
AEROSPIKE_PORT: "3000"
AEROSPIKE_NAMESPACE: test
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ matrix.python-version }}
- name: Install package + test deps
run: |
python -m pip install --upgrade pip
pip install -e .
pip install pytest pytest-asyncio pytest-cov
- name: Wait for Aerospike
run: |
for i in $(seq 1 30); do
python -c "import aerospike; c=aerospike.client({'hosts':[('127.0.0.1',3000)]}).connect(); c.close()" && exit 0
echo "Waiting for Aerospike... ($i)"
sleep 2
done
echo "Aerospike did not become ready" >&2
exit 1
- name: Run tests
run: pytest -v --cov=openai_agents_aerospike --cov-report=term-missing