-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (61 loc) · 2.03 KB
/
sdk-integration.yml
File metadata and controls
72 lines (61 loc) · 2.03 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
name: SDK Integration Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
sdk-integration:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15-alpine
env:
POSTGRES_DB: cueapi_test
POSTGRES_USER: runner
POSTGRES_PASSWORD: ""
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 2s
--health-timeout 3s
--health-retries 10
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 2s
--health-timeout 3s
--health-retries 10
steps:
- name: Checkout cueapi-python SDK
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.7
- name: Checkout cueapi-core
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.7
with:
repository: cueapi/cueapi-core
path: cueapi-core
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python 3.12
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.3.0
with:
python-version: "3.12"
- name: Install cueapi-core dependencies
run: pip install -r cueapi-core/requirements.txt
- name: Install cueapi-python SDK (editable)
run: pip install -e .
- name: Copy SDK integration test into cueapi-core test dir
run: cp cueapi-core/tests/test_sdk_integration.py /tmp/test_sdk_integration.py
- name: Run SDK integration tests (cross-layer)
env:
DATABASE_URL: postgresql+asyncpg://runner@localhost:5432/cueapi_test
REDIS_URL: redis://localhost:6379
SESSION_SECRET: test-session-secret-32-chars-minimum!!
ENV: test
RESEND_API_KEY: ""
working-directory: cueapi-core
run: pytest tests/test_sdk_integration.py -v --tb=short