Skip to content

Commit e109628

Browse files
authored
Merge pull request usnavy13#92 from usnavy13/deps/bump-dependencies
chore(deps): Bump 6 Python dependencies
2 parents 0fc9cc3 + 74bb001 commit e109628

3 files changed

Lines changed: 10 additions & 564 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 326 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ name: CI
33
on:
44
pull_request:
55
branches: [main, dev]
6-
push:
7-
branches: [main, dev]
8-
tags: ["v*.*.*"]
9-
merge_group:
106

117
concurrency:
128
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -17,33 +13,8 @@ permissions:
1713

1814
env:
1915
PYTHON_VERSION: "3.11"
20-
LOCAL_API_IMAGE_AMD64: code-interpreter:ci-amd64
21-
LOCAL_API_IMAGE_ARM64: code-interpreter:ci-arm64
2216

2317
jobs:
24-
changes:
25-
runs-on: ubuntu-latest
26-
outputs:
27-
runtime: ${{ steps.filter.outputs.runtime }}
28-
container: ${{ steps.filter.outputs.container }}
29-
steps:
30-
- uses: actions/checkout@v4
31-
32-
- id: filter
33-
uses: dorny/paths-filter@v3
34-
with:
35-
filters: |
36-
runtime:
37-
- 'Dockerfile'
38-
- 'docker/requirements/**'
39-
container:
40-
- 'Dockerfile'
41-
- 'docker/**'
42-
- 'src/**'
43-
- 'dashboard/**'
44-
- 'requirements.txt'
45-
- 'docker-compose.yml'
46-
4718
static:
4819
runs-on: ubuntu-latest
4920
steps:
@@ -91,48 +62,9 @@ jobs:
9162
pip install pytest pytest-asyncio pytest-cov pytest-mock
9263
9364
- name: Run unit tests
94-
run: |
95-
mkdir -p test-results
96-
pytest tests/unit/ --junitxml=test-results/unit.xml
97-
98-
- name: Upload unit results
99-
if: always()
100-
uses: actions/upload-artifact@v4
101-
with:
102-
name: unit-results
103-
path: test-results/
104-
if-no-files-found: ignore
105-
106-
integration-contract:
107-
runs-on: ubuntu-latest
108-
steps:
109-
- uses: actions/checkout@v4
110-
111-
- uses: actions/setup-python@v6
112-
with:
113-
python-version: ${{ env.PYTHON_VERSION }}
114-
cache: pip
65+
run: pytest tests/unit/
11566

116-
- name: Install dependencies
117-
run: |
118-
python -m pip install --upgrade pip
119-
pip install -r requirements.txt
120-
pip install pytest pytest-asyncio pytest-cov pytest-mock
121-
122-
- name: Run contract integration tests
123-
run: |
124-
mkdir -p test-results
125-
pytest tests/integration/ -m contract_only --junitxml=test-results/integration-contract.xml
126-
127-
- name: Upload contract integration results
128-
if: always()
129-
uses: actions/upload-artifact@v4
130-
with:
131-
name: integration-contract-results
132-
path: test-results/
133-
if-no-files-found: ignore
134-
135-
integration-core:
67+
integration:
13668
runs-on: ubuntu-latest
13769
steps:
13870
- uses: actions/checkout@v4
@@ -148,259 +80,5 @@ jobs:
14880
pip install -r requirements.txt
14981
pip install pytest pytest-asyncio pytest-cov pytest-mock
15082
151-
- name: Run core integration tests
152-
run: |
153-
mkdir -p test-results
154-
pytest tests/integration/ -m "not contract_only" --junitxml=test-results/integration-core.xml
155-
156-
- name: Upload core integration results
157-
if: always()
158-
uses: actions/upload-artifact@v4
159-
with:
160-
name: integration-core-results
161-
path: test-results/
162-
if-no-files-found: ignore
163-
164-
build-app-amd64:
165-
needs: [changes]
166-
runs-on: ubuntu-24.04
167-
steps:
168-
- uses: actions/checkout@v4
169-
170-
- uses: docker/setup-buildx-action@v3
171-
172-
- name: Build amd64 app candidate
173-
run: |
174-
docker buildx build \
175-
--load \
176-
--target app \
177-
--tag "${LOCAL_API_IMAGE_AMD64}" \
178-
--cache-from "type=gha,scope=app-amd64" \
179-
--cache-to "type=gha,scope=app-amd64,mode=max" \
180-
.
181-
182-
- name: Inspect amd64 image
183-
run: docker image inspect "${LOCAL_API_IMAGE_AMD64}" >/dev/null
184-
185-
functional-smoke-amd64:
186-
needs: [changes]
187-
runs-on: ubuntu-24.04
188-
timeout-minutes: 45
189-
steps:
190-
- uses: actions/checkout@v4
191-
192-
- uses: actions/setup-python@v6
193-
with:
194-
python-version: ${{ env.PYTHON_VERSION }}
195-
cache: pip
196-
197-
- uses: docker/setup-buildx-action@v3
198-
199-
- name: Install test dependencies
200-
run: |
201-
python -m pip install --upgrade pip
202-
pip install -r requirements.txt
203-
pip install pytest pytest-asyncio pytest-cov pytest-mock
204-
205-
- name: Build local amd64 test image
206-
run: |
207-
docker buildx build \
208-
--load \
209-
--target app \
210-
--tag "${LOCAL_API_IMAGE_AMD64}" \
211-
--cache-from "type=gha,scope=app-amd64" \
212-
--cache-to "type=gha,scope=app-amd64,mode=max" \
213-
.
214-
215-
- name: Start live stack
216-
env:
217-
API_IMAGE: ${{ env.LOCAL_API_IMAGE_AMD64 }}
218-
run: |
219-
cp .env.example .env
220-
docker compose up -d
221-
222-
- name: Wait for API
223-
run: |
224-
if ! scripts/ci/wait_for_api.sh http://localhost:8000/health 24 5; then
225-
docker compose logs --no-color api
226-
exit 1
227-
fi
228-
229-
- name: Run live smoke tests
230-
env:
231-
API_BASE: http://localhost:8000
232-
API_KEY: your-secure-api-key-here-change-this-in-production
233-
run: |
234-
mkdir -p test-results
235-
pytest tests/functional/ \
236-
-m "live_api and not slow and not client_replay" \
237-
-v \
238-
--junitxml=test-results/functional-smoke-amd64.xml
239-
240-
- name: Capture compose logs on failure
241-
if: failure()
242-
run: docker compose logs --no-color > compose-amd64.log
243-
244-
- name: Upload functional smoke artifacts
245-
if: always()
246-
uses: actions/upload-artifact@v4
247-
with:
248-
name: functional-smoke-amd64
249-
path: |
250-
test-results/
251-
compose-amd64.log
252-
if-no-files-found: ignore
253-
254-
- name: Stop live stack
255-
if: always()
256-
run: docker compose down -v
257-
258-
client-replay-amd64:
259-
needs: [changes]
260-
runs-on: ubuntu-24.04
261-
timeout-minutes: 45
262-
steps:
263-
- uses: actions/checkout@v4
264-
265-
- uses: actions/setup-python@v6
266-
with:
267-
python-version: ${{ env.PYTHON_VERSION }}
268-
cache: pip
269-
270-
- uses: docker/setup-buildx-action@v3
271-
272-
- name: Install test dependencies
273-
run: |
274-
python -m pip install --upgrade pip
275-
pip install -r requirements.txt
276-
pip install pytest pytest-asyncio pytest-cov pytest-mock
277-
278-
- name: Build local amd64 replay image
279-
run: |
280-
docker buildx build \
281-
--load \
282-
--target app \
283-
--tag "${LOCAL_API_IMAGE_AMD64}" \
284-
--cache-from "type=gha,scope=app-amd64" \
285-
--cache-to "type=gha,scope=app-amd64,mode=max" \
286-
.
287-
288-
- name: Start live stack
289-
env:
290-
API_IMAGE: ${{ env.LOCAL_API_IMAGE_AMD64 }}
291-
run: |
292-
cp .env.example .env
293-
docker compose up -d
294-
295-
- name: Wait for API
296-
run: |
297-
if ! scripts/ci/wait_for_api.sh http://localhost:8000/health 24 5; then
298-
docker compose logs --no-color api
299-
exit 1
300-
fi
301-
302-
- name: Run client replay tests
303-
env:
304-
API_BASE: http://localhost:8000
305-
API_KEY: your-secure-api-key-here-change-this-in-production
306-
run: |
307-
mkdir -p test-results
308-
pytest tests/functional/ \
309-
-m client_replay \
310-
-v \
311-
--junitxml=test-results/client-replay-amd64.xml
312-
313-
- name: Capture compose logs on failure
314-
if: failure()
315-
run: docker compose logs --no-color > compose-client-replay.log
316-
317-
- name: Upload client replay artifacts
318-
if: always()
319-
uses: actions/upload-artifact@v4
320-
with:
321-
name: client-replay-amd64
322-
path: |
323-
test-results/
324-
compose-client-replay.log
325-
if-no-files-found: ignore
326-
327-
- name: Stop live stack
328-
if: always()
329-
run: docker compose down -v
330-
331-
arm64-smoke-conditional:
332-
if: needs.changes.outputs.container == 'true'
333-
needs: [changes]
334-
runs-on: ubuntu-24.04-arm
335-
timeout-minutes: 35
336-
steps:
337-
- uses: actions/checkout@v4
338-
339-
- uses: actions/setup-python@v6
340-
with:
341-
python-version: ${{ env.PYTHON_VERSION }}
342-
cache: pip
343-
344-
- uses: docker/setup-buildx-action@v3
345-
346-
- name: Install test dependencies
347-
run: |
348-
python -m pip install --upgrade pip
349-
pip install -r requirements.txt
350-
pip install pytest pytest-asyncio pytest-cov pytest-mock
351-
352-
- name: Build local arm64 test image
353-
run: |
354-
docker buildx build \
355-
--load \
356-
--target app \
357-
--tag "${LOCAL_API_IMAGE_ARM64}" \
358-
--cache-from "type=gha,scope=app-arm64" \
359-
--cache-to "type=gha,scope=app-arm64,mode=max" \
360-
.
361-
362-
- name: Start live stack
363-
env:
364-
API_IMAGE: ${{ env.LOCAL_API_IMAGE_ARM64 }}
365-
run: |
366-
cp .env.example .env
367-
docker compose up -d
368-
369-
- name: Wait for API
370-
run: |
371-
if ! scripts/ci/wait_for_api.sh http://localhost:8000/health 24 5; then
372-
docker compose logs --no-color api
373-
exit 1
374-
fi
375-
376-
- name: Run arm64 smoke suite
377-
env:
378-
API_BASE: http://localhost:8000
379-
API_KEY: your-secure-api-key-here-change-this-in-production
380-
run: |
381-
mkdir -p test-results
382-
pytest \
383-
tests/functional/test_health.py \
384-
tests/functional/test_exec_workflow.py::TestSessionWorkflow::test_execution_creates_session \
385-
tests/functional/test_files.py::TestFileUpload::test_upload_single_file \
386-
tests/functional/test_ptc.py::TestPTCInitialExecution::test_ptc_simple_code_completes \
387-
-v \
388-
--junitxml=test-results/arm64-smoke.xml
389-
390-
- name: Capture compose logs on failure
391-
if: failure()
392-
run: docker compose logs --no-color > compose-arm64.log
393-
394-
- name: Upload arm64 smoke artifacts
395-
if: always()
396-
uses: actions/upload-artifact@v4
397-
with:
398-
name: arm64-smoke
399-
path: |
400-
test-results/
401-
compose-arm64.log
402-
if-no-files-found: ignore
403-
404-
- name: Stop live stack
405-
if: always()
406-
run: docker compose down -v
83+
- name: Run integration tests
84+
run: pytest tests/integration/

0 commit comments

Comments
 (0)