-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (67 loc) · 2.01 KB
/
integration.yml
File metadata and controls
80 lines (67 loc) · 2.01 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
name: Integration Tests
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "src/codesphere/**"
- "tests/integration/**"
- ".github/workflows/integration.yml"
permissions:
contents: read
checks: write
pull-requests: write
env:
PYTHON_VERSION: "3.12"
jobs:
integration-tests:
name: Run Integration Tests
runs-on: ubuntu-latest
if: ${{ github.repository == 'Datata1/codesphere-python' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv package manager
uses: astral-sh/setup-uv@v6
with:
activate-environment: true
enable-cache: true
- name: Install dependencies
run: uv sync --extra dev
- name: Run integration tests
env:
CS_TOKEN: ${{ secrets.CS_TOKEN }}
CS_TEST_TEAM_ID: ${{ secrets.CS_TEST_TEAM_ID }}
CS_TEST_DC_ID: ${{ secrets.CS_TEST_DC_ID }}
run: |
echo "Running integration tests..."
uv run pytest tests/integration -v --run-integration \
--junitxml=junit/integration-results.xml \
--tb=short
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: integration-test-results
path: junit/integration-results.xml
retention-days: 30
- name: Minimize uv cache
run: uv cache prune --ci
integration-tests-summary:
name: Integration Tests Summary
runs-on: ubuntu-latest
needs: integration-tests
if: always()
steps:
- name: Download test results
uses: actions/download-artifact@v4
with:
name: integration-test-results
path: junit
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: junit/integration-results.xml
check_name: Integration Test Results
comment_mode: on