-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (82 loc) · 2.83 KB
/
ci.yml
File metadata and controls
86 lines (82 loc) · 2.83 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
with:
version: "latest"
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.12"
- name: Install dependencies
run: uv sync --all-groups
- name: Ruff check
run: uv run ruff check .
- name: Ruff format check
run: uv run ruff format . --diff
- name: Mypy
run: uv run mypy langchain_arcadedb
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
with:
version: "latest"
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --group test
- name: Run unit tests
run: uv run pytest tests/unit_tests/ --disable-socket --allow-unix-socket -v
integration-test:
runs-on: ubuntu-latest
services:
arcadedb:
image: arcadedata/arcadedb:latest
ports:
- 2480:2480
- 7687:7687
env:
JAVA_OPTS: "-Darcadedb.server.plugins=Bolt:com.arcadedb.bolt.BoltProtocolPlugin"
arcadedb.server.rootPassword: playwithdata
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
with:
version: "latest"
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.12"
- name: Install dependencies
run: uv sync --group test --group test_integration
- name: Wait for ArcadeDB
run: |
for i in $(seq 1 30); do
curl -s http://localhost:2480/api/v1/server -u root:playwithdata && break
sleep 2
done
- name: Create test database
run: |
curl -X POST http://localhost:2480/api/v1/server \
-d '{"command":"create database mydb"}' \
-u root:playwithdata \
-H "Content-Type: application/json"
- name: Run integration tests
env:
ARCADEDB_URI: bolt://localhost:7687
ARCADEDB_USERNAME: root
ARCADEDB_PASSWORD: playwithdata
ARCADEDB_DATABASE: mydb
run: uv run pytest tests/integration_tests/ -v