Skip to content

Commit 0f4a513

Browse files
committed
Add integration tests workflow for Exosphere
- Created a new GitHub Actions workflow for running integration tests, triggered on pushes to the main branch. - Configured MongoDB service for test environment setup, including health checks and initialization parameters. - Set up Python environment and installed development dependencies using Uvicorn. - Implemented steps to run integration tests with pytest, ensuring proper environment variable configuration for database access and API keys. - Removed release trigger from the publish-state-manager workflow to streamline the process.
1 parent 9ee7955 commit 0f4a513

2 files changed

Lines changed: 58 additions & 2 deletions

File tree

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Integration Tests for Exosphere
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'integration-tests/**'
8+
- 'state-manager/**'
9+
- 'python-sdk/**'
10+
- '.github/workflows/integration-tests.yml'
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
services:
16+
mongodb:
17+
image: mongo:7
18+
ports:
19+
- 27017:27017
20+
options: >-
21+
--health-cmd "mongosh --eval 'db.runCommand(\"ping\")'"
22+
--health-interval 10s
23+
--health-timeout 5s
24+
--health-retries 5
25+
env:
26+
MONGO_INITDB_ROOT_USERNAME: admin
27+
MONGO_INITDB_ROOT_PASSWORD: password
28+
MONGO_INITDB_DATABASE: integration_tests
29+
30+
steps:
31+
- name: Checkout code
32+
uses: actions/checkout@v4
33+
34+
- name: Set up Python
35+
uses: actions/setup-python@v5
36+
with:
37+
python-version: '3.12'
38+
39+
- name: Install uv
40+
uses: astral-sh/setup-uv@v2
41+
with:
42+
cache: true
43+
44+
- name: Install dev dependencies with uv
45+
working-directory: integration-tests
46+
run: |
47+
uv sync --group dev
48+
49+
- name: Run integration tests
50+
working-directory: integration-tests
51+
env:
52+
MONGO_URI: mongodb://admin:password@localhost:27017
53+
MONGO_DATABASE_NAME: integration_tests
54+
STATE_MANAGER_SECRET: test-secret-key
55+
EXOSPHERE_API_KEY: test-secret-key
56+
SECRETS_ENCRYPTION_KEY: YTzpUlBGLSwm-3yKJRJTZnb0_aQuQQHyz64s8qAERVU=
57+
run: |
58+
uv run pytest

.github/workflows/publish-state-mangaer.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ on:
55
branches: [main]
66
paths:
77
- 'state-manager/**'
8-
release:
9-
types: [published]
108
workflow_dispatch:
119

1210
env:

0 commit comments

Comments
 (0)