Repository navigation
212 lines (212 loc) · 6.6 KB
/
Copy pathtest.yml
File metadata and controls
212 lines (212 loc) · 6.6 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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# Do not edit this YAML file. This file is generated automatically by executing
# python scripts/split_tox_gh_actions/split_tox_gh_actions.py
# The template responsible for it is in
# scripts/split_tox_gh_actions/templates/test_orchestrator.jinja
#
# Top-level test orchestrator. It runs every test group (each a reusable
# workflow) in a single run, then combines their coverage and reports it once.
name: Test
on:
push:
branches:
- master
- release/**
- major/**
pull_request:
# Cancel in progress workflows on pull_requests.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
actions: read
checks: write
pull-requests: write
statuses: write
# To temporarily skip a group for unblocking a release,
# add `if: false` to its job below, e.g.:
#
# dbs:
# name: DBs
# if: false # TEMP: skipping, see PR #xxxx
# uses: ./.github/workflows/test-integrations-dbs.yml
jobs:
files-changed:
name: Detect changed files
runs-on: ubuntu-24.04
timeout-minutes: 3
permissions:
contents: read
pull-requests: read
outputs:
code: ${{ github.event_name != 'pull_request' || steps.changes.outputs.code == 'true' }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
if: github.event_name == 'pull_request'
- name: Check for code changes
id: changes
if: github.event_name == 'pull_request'
uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
with:
token: ${{ github.token }}
predicate-quantifier: some-with-excludes
filters: |
code:
- '**'
- '!**/*.md'
- '!docs/**'
- '!LICENSE'
- '!.agents/**'
- '!.github/ISSUE_TEMPLATE/**'
- '!.github/CODEOWNERS'
- '!.git-blame-ignore-revs'
common:
name: Common
needs: files-changed
if: ${{ needs.files-changed.outputs.code == 'true' }}
uses: ./.github/workflows/test-integrations-common.yml
mcp:
name: MCP
needs: files-changed
if: ${{ needs.files-changed.outputs.code == 'true' }}
uses: ./.github/workflows/test-integrations-mcp.yml
agents:
name: Agents
needs: files-changed
if: ${{ needs.files-changed.outputs.code == 'true' }}
uses: ./.github/workflows/test-integrations-agents.yml
ai_workflow:
name: AI Workflow
needs: files-changed
if: ${{ needs.files-changed.outputs.code == 'true' }}
uses: ./.github/workflows/test-integrations-ai-workflow.yml
ai:
name: AI
needs: files-changed
if: ${{ needs.files-changed.outputs.code == 'true' }}
uses: ./.github/workflows/test-integrations-ai.yml
cloud:
name: Cloud
needs: files-changed
if: ${{ needs.files-changed.outputs.code == 'true' }}
uses: ./.github/workflows/test-integrations-cloud.yml
dbs:
name: DBs
needs: files-changed
if: ${{ needs.files-changed.outputs.code == 'true' }}
uses: ./.github/workflows/test-integrations-dbs.yml
flags:
name: Flags
needs: files-changed
if: ${{ needs.files-changed.outputs.code == 'true' }}
uses: ./.github/workflows/test-integrations-flags.yml
gevent:
name: Gevent
needs: files-changed
if: ${{ needs.files-changed.outputs.code == 'true' }}
uses: ./.github/workflows/test-integrations-gevent.yml
graphql:
name: GraphQL
needs: files-changed
if: ${{ needs.files-changed.outputs.code == 'true' }}
uses: ./.github/workflows/test-integrations-graphql.yml
network:
name: Network
needs: files-changed
if: ${{ needs.files-changed.outputs.code == 'true' }}
uses: ./.github/workflows/test-integrations-network.yml
tasks:
name: Tasks
needs: files-changed
if: ${{ needs.files-changed.outputs.code == 'true' }}
uses: ./.github/workflows/test-integrations-tasks.yml
web_1:
name: Web 1
needs: files-changed
if: ${{ needs.files-changed.outputs.code == 'true' }}
uses: ./.github/workflows/test-integrations-web-1.yml
web_2:
name: Web 2
needs: files-changed
if: ${{ needs.files-changed.outputs.code == 'true' }}
uses: ./.github/workflows/test-integrations-web-2.yml
misc:
name: Misc
needs: files-changed
if: ${{ needs.files-changed.outputs.code == 'true' }}
uses: ./.github/workflows/test-integrations-misc.yml
report:
name: Combine and report coverage
needs:
- files-changed
- common
- mcp
- agents
- ai_workflow
- ai
- cloud
- dbs
- flags
- gevent
- graphql
- network
- tasks
- web_1
- web_2
- misc
# Report whatever coverage exists, even if some test jobs failed.
if: ${{ !cancelled() && needs.files-changed.outputs.code == 'true' }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install uv
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
- name: Download coverage data
# Artifacts from the reusable test workflows live in this same run.
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
pattern: coverage-*
merge-multiple: true
- name: Combine coverage and generate XML
run: |
uv sync
# relative_files + [tool.coverage.paths] let the 3.6/3.7 container and
# the runner data files merge into one source tree.
uv run coverage combine .coverage-sentry-*
uv run coverage xml
- name: Report coverage and test results
uses: getsentry/coverage-action@b3db4e382bd9859c913a96093a3d369b67f59177 # 0.4.4
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: coverage.xml
junit-xml-pattern: .junitxml-*
base-branch: master
post-pr-comment: true
verbose: true
check-required:
name: All tests passed
needs:
- files-changed
- common
- mcp
- agents
- ai_workflow
- ai
- cloud
- dbs
- flags
- gevent
- graphql
- network
- tasks
- web_1
- web_2
- misc
# Always run so it can gate merges even when a dependency failed.
if: always()
runs-on: ubuntu-22.04
steps:
- name: Check for failures
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
run: |
echo "One of the test jobs failed. You may need to re-run it." && exit 1