forked from finos/open-resource-broker
-
Notifications
You must be signed in to change notification settings - Fork 0
182 lines (169 loc) · 7.37 KB
/
Copy pathtest-matrix.yml
File metadata and controls
182 lines (169 loc) · 7.37 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
name: Test Matrix
on:
schedule:
# Nightly comprehensive testing: all Python versions across the full matrix.
# Not triggered on push because ci-tests.yml already covers default-Python
# unit/integration on every main/develop push, and the multi-Python sweep
# would duplicate that work. Keeping the nightly run ensures all supported
# versions are validated regularly without burning extra CI minutes on PRs.
- cron: '0 2 * * *'
workflow_dispatch:
# Allow manual triggering of the full matrix at any time.
# Scope concurrency per-ref: two schedule runs can never overlap and a manual
# dispatch on main won't cancel a running nightly sweep on a different ref.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
config:
name: Get Configuration
uses: ./.github/workflows/shared-config.yml
setup-cache:
name: Setup Test Cache
needs: config
uses: ./.github/workflows/cache-management.yml
with:
cache-type: dependencies
cache-key-base: test-deps
python-version: ${{ needs.config.outputs.default-python-version }}
unit-tests:
name: Unit Tests
needs: [config, setup-cache]
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest] # Disabled windows-latest, macos-latest for now
# Dynamic matrix from config with static fallback for act/dry-run
# Update static list when adding new Python versions (currently 3.10-3.14)
python-version: ${{ fromJSON(needs.config.outputs.python-versions || '["3.10", "3.11", "3.12", "3.13", "3.14"]') }}
uses: ./.github/workflows/reusable-test.yml
secrets: inherit
with:
test-type: unit
python-version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
default-python-version: ${{ needs.config.outputs.default-python-version }}
cache-key: ${{ needs.setup-cache.outputs.cache-key }}
artifact-prefix: test-matrix
aws-region: ${{ needs.config.outputs.aws-region }}
aws-access-key: ${{ needs.config.outputs.aws-access-key }}
aws-secret-key: ${{ needs.config.outputs.aws-secret-key }}
environment: ${{ needs.config.outputs.environment }}
testing-flag: ${{ needs.config.outputs.testing-flag }}
integration-tests:
name: Integration Tests
needs: [config, setup-cache]
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest] # Disabled windows-latest, macos-latest for now
# Dynamic matrix from config with static fallback for act/dry-run
# Update static list when adding new Python versions (currently 3.10-3.14)
python-version: ${{ fromJSON(needs.config.outputs.python-versions || '["3.10", "3.11", "3.12", "3.13", "3.14"]') }}
uses: ./.github/workflows/reusable-test.yml
secrets: inherit
with:
test-type: integration
python-version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
default-python-version: ${{ needs.config.outputs.default-python-version }}
cache-key: ${{ needs.setup-cache.outputs.cache-key }}
artifact-prefix: test-matrix
aws-region: ${{ needs.config.outputs.aws-region }}
aws-access-key: ${{ needs.config.outputs.aws-access-key }}
aws-secret-key: ${{ needs.config.outputs.aws-secret-key }}
environment: ${{ needs.config.outputs.environment }}
testing-flag: ${{ needs.config.outputs.testing-flag }}
# Provider matrix: auto-discovered from tests/providers/*/testconf.mk via
# shared-config. Adding a new provider directory + testconf.mk fragment
# causes it to run here across all Python versions with no workflow edit.
providers-tests:
name: Providers Tests
needs: [config, setup-cache]
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ${{ fromJSON(needs.config.outputs.python-versions || '["3.10", "3.11", "3.12", "3.13", "3.14"]') }}
# Dynamic discovery: static fallback ['aws'] keeps CI valid in forks.
provider: ${{ fromJSON(needs.config.outputs.providers || '["aws"]') }}
uses: ./.github/workflows/reusable-test.yml
secrets: inherit
with:
test-type: providers
provider: ${{ matrix.provider }}
python-version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
default-python-version: ${{ needs.config.outputs.default-python-version }}
cache-key: ${{ needs.setup-cache.outputs.cache-key }}
artifact-prefix: test-matrix
aws-region: ${{ needs.config.outputs.aws-region }}
aws-access-key: ${{ needs.config.outputs.aws-access-key }}
aws-secret-key: ${{ needs.config.outputs.aws-secret-key }}
environment: ${{ needs.config.outputs.environment }}
testing-flag: ${{ needs.config.outputs.testing-flag }}
# package-variant-tests was removed from this workflow.
# The authoritative package-variant testing lives in package-testing.yml which
# builds the wheel (not editable source), tests the minimal and all meta-extras,
# and includes import-guard, dependency-isolation, and error-message-quality
# steps. Running a lighter import-probe matrix here too caused the same
# Python/extra combinations to be checked twice on every main push.
e2e-tests:
name: End-to-End Tests
needs: [config, setup-cache]
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest] # Disabled windows-latest, macos-latest for now
# Dynamic matrix from config with static fallback for act/dry-run
# Update static list when adding new Python versions (currently 3.10-3.14)
python-version: ${{ fromJSON(needs.config.outputs.python-versions || '["3.10", "3.11", "3.12", "3.13", "3.14"]') }}
uses: ./.github/workflows/reusable-test.yml
secrets: inherit
with:
test-type: e2e
python-version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
default-python-version: ${{ needs.config.outputs.default-python-version }}
cache-key: ${{ needs.setup-cache.outputs.cache-key }}
artifact-prefix: test-matrix
aws-region: ${{ needs.config.outputs.aws-region }}
aws-access-key: ${{ needs.config.outputs.aws-access-key }}
aws-secret-key: ${{ needs.config.outputs.aws-secret-key }}
environment: ${{ needs.config.outputs.environment }}
testing-flag: ${{ needs.config.outputs.testing-flag }}
test-summary:
name: Test Summary
runs-on: ubuntu-latest
timeout-minutes: 10
needs: [unit-tests, integration-tests, providers-tests, e2e-tests]
if: always()
permissions:
contents: read
steps:
- name: Download all test results
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
path: test-results/
- name: Display test summary
run: |
# Count test result files
UNIT_RESULTS=$(find test-results/ -name "*unit.xml" | wc -l)
INTEGRATION_RESULTS=$(find test-results/ -name "*integration.xml" | wc -l)
{
echo "## Test Matrix Results"
echo ""
echo "- Unit test configurations: $UNIT_RESULTS"
echo "- Integration test configurations: $INTEGRATION_RESULTS"
echo ""
echo "### Test Result Files:"
} >> "$GITHUB_STEP_SUMMARY"
find test-results/ -name "*.xml" | sort >> "$GITHUB_STEP_SUMMARY"