55 types : [ opened, synchronize, ready_for_review ]
66 merge_group :
77 types : [ checks_requested ]
8- push :
9- branches :
10- - main
118
129permissions :
1310 contents : read
@@ -17,14 +14,23 @@ concurrency:
1714 cancel-in-progress : false # don't cancel ongoing runs to ensure fixtures are completed and resources terminated
1815
1916jobs :
17+ # Gate all downstream jobs behind a single check so PRs from forks (no access to the
18+ # tool environment) and draft PRs do not trigger the expensive acceptance suite.
19+ # PRs from forks are to be tested by the reviewer(s) / maintainer(s) before merging.
20+ not-a-fork :
21+ runs-on :
22+ group : databrickslabs-protected-runner-group
23+ labels : linux-ubuntu-latest
24+ if : github.event_name == 'pull_request' && !github.event.pull_request.draft && !github.event.pull_request.head.repo.fork
25+ steps :
26+ - run : echo "Not a fork PR, proceeding"
2027
2128 integration :
22- # Only run this job for PRs from branches on the main repository and not from forks.
23- # Workflows triggered by PRs from forks don't have access to the tool environment.
24- # PRs from forks to be tested by the reviewer(s) / maintainer(s) before merging.
25- if : github.event_name == 'pull_request' && !github.event.pull_request.draft && !github.event.pull_request.head.repo.fork
29+ needs : not-a-fork
2630 environment : tool
27- runs-on : larger
31+ runs-on :
32+ group : larger-runners
33+ labels : larger
2834 permissions :
2935 # Access to the integration testing infrastructure.
3036 id-token : write
@@ -36,17 +42,11 @@ jobs:
3642 with :
3743 fetch-depth : 0
3844
39- - name : Setup uv
40- uses : astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
41- with :
42- version : " 0.11.2"
43- checksum : " 7ac2ca0449c8d68dae9b99e635cd3bc9b22a4cb1de64b7c43716398447d42981"
45+ - name : Setup environment
46+ uses : ./.github/actions/setup-env
4447
45- - name : Setup for JFrog
46- uses : ./.github/actions/jfrog-auth
47-
48- - name : Run unit tests and generate test coverage report
49- run : make test
48+ - name : Pre-build DQX wheel
49+ uses : ./.github/actions/prebuild-wheel
5050
5151 # Integration tests are run from within tests/integration folder.
5252 # Create .coveragerc with correct relative path to source code.
@@ -56,13 +56,14 @@ jobs:
5656 [run]
5757 source = ../../src
5858 relative_files = true
59+ parallel = true
5960 EOF
6061
6162 # Run tests from `tests/integration` as defined in .codegen.json
6263 # and generate code coverage for modules defined in .coveragerc
6364 # Run 10 tests in parallel: https://github.com/databrickslabs/sandbox/blob/main/acceptance/ecosystem/pytest_run.py
6465 - name : Run integration tests and generate test coverage report
65- uses : databrickslabs/sandbox/acceptance@3313d06ce86227537b3f37f5974f7eecb2a8e59a # acceptance/v0.4.4
66+ uses : databrickslabs/sandbox/acceptance@83461e5dd7021feabb1a9ca3ee10d6f46b72092a # acceptance/v0.4.6
6667 with :
6768 vault_uri : ${{ secrets.VAULT_URI }}
6869 timeout : 2h
@@ -72,24 +73,22 @@ jobs:
7273 ARM_CLIENT_ID : ${{ secrets.ARM_CLIENT_ID }}
7374 ARM_TENANT_ID : ${{ secrets.ARM_TENANT_ID }}
7475 COVERAGE_FILE : ${{ github.workspace }}/.coverage # make sure the coverage report is preserved
75-
7676 - name : Merge coverage reports and convert them to XML
7777 run : make combine-coverage
7878
79- # Recursively search the entire workspace directory for all coverage reports.
80- # All uploaded test coverage reports will be used even if publish is done multiple time.
8179 - name : Publish test coverage
8280 uses : codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
8381 with :
8482 use_oidc : true
83+ files : coverage-combined.xml
84+ flags : integration
8585
8686 integration_serverless :
87- # Only run this job for PRs from branches on the main repository and not from forks.
88- # Workflows triggered by PRs from forks don't have access to the tool environment.
89- # PRs from forks to be tested by the reviewer(s) / maintainer(s) before merging.
90- if : github.event_name == 'pull_request' && !github.event.pull_request.draft && !github.event.pull_request.head.repo.fork
87+ needs : not-a-fork
9188 environment : tool
92- runs-on : larger
89+ runs-on :
90+ group : larger-runners
91+ labels : larger
9392 permissions :
9493 id-token : write
9594 pull-requests : write
@@ -101,14 +100,11 @@ jobs:
101100 with :
102101 fetch-depth : 0
103102
104- - name : Setup uv
105- uses : astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
106- with :
107- version : " 0.11.2"
108- checksum : " 7ac2ca0449c8d68dae9b99e635cd3bc9b22a4cb1de64b7c43716398447d42981"
103+ - name : Setup environment
104+ uses : ./.github/actions/setup-env
109105
110- - name : Setup for JFrog
111- uses : ./.github/actions/jfrog-auth
106+ - name : Pre-build DQX wheel
107+ uses : ./.github/actions/prebuild-wheel
112108
113109 # Integration tests are run from within tests/integration folder.
114110 # Create .coveragerc with correct relative path to source code.
@@ -118,10 +114,11 @@ jobs:
118114 [run]
119115 source = ../../src
120116 relative_files = true
117+ parallel = true
121118 EOF
122119
123120 - name : Run integration tests on serverless cluster
124- uses : databrickslabs/sandbox/acceptance@3313d06ce86227537b3f37f5974f7eecb2a8e59a # acceptance/v0.4.4
121+ uses : databrickslabs/sandbox/acceptance@83461e5dd7021feabb1a9ca3ee10d6f46b72092a # acceptance/v0.4.6
125122 with :
126123 vault_uri : ${{ secrets.VAULT_URI }}
127124 timeout : 2h
@@ -132,20 +129,22 @@ jobs:
132129 ARM_TENANT_ID : ${{ secrets.ARM_TENANT_ID }}
133130 DATABRICKS_SERVERLESS_COMPUTE_ID : ${{ env.DATABRICKS_SERVERLESS_COMPUTE_ID }}
134131 COVERAGE_FILE : ${{ github.workspace }}/.coverage # make sure the coverage report is preserved
135-
136132 - name : Merge coverage reports and convert them to XML
137133 run : make combine-coverage
138134
139- # collects all coverage reports
140135 - name : Publish test coverage
141136 uses : codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
142137 with :
143138 use_oidc : true
139+ files : coverage-combined.xml
140+ flags : integration-serverless
144141
145142 e2e :
146- if : github.event_name == 'pull_request' && !github.event.pull_request.draft && !github.event.pull_request.head.repo. fork
143+ needs : not-a- fork
147144 environment : tool
148- runs-on : larger
145+ runs-on :
146+ group : larger-runners
147+ labels : larger
149148 permissions :
150149 id-token : write
151150 pull-requests : write
@@ -155,21 +154,18 @@ jobs:
155154 with :
156155 fetch-depth : 0
157156
158- - name : Setup uv
159- uses : astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
160- with :
161- version : " 0.11.2"
162- checksum : " 7ac2ca0449c8d68dae9b99e635cd3bc9b22a4cb1de64b7c43716398447d42981"
157+ - name : Setup environment
158+ uses : ./.github/actions/setup-env
163159
164- - name : Setup for JFrog
165- uses : ./.github/actions/jfrog-auth
160+ - name : Pre-build DQX wheel
161+ uses : ./.github/actions/prebuild-wheel
166162
167163 # Required for DAB (Databricks Asset Bundle) e2e tests
168164 - name : Install Databricks CLI
169- uses : databricks/setup-cli@acd0e77a1ed7f15f528faca1e1f7f5590bcfdff8 # v0.296.0
165+ uses : databricks/setup-cli@596b0a354ba14aa59921aca1b02bd67c2b0a81a5 # v0.297.2
170166
171167 - name : Run e2e tests
172- uses : databrickslabs/sandbox/acceptance@3313d06ce86227537b3f37f5974f7eecb2a8e59a # acceptance/v0.4.4
168+ uses : databrickslabs/sandbox/acceptance@83461e5dd7021feabb1a9ca3ee10d6f46b72092a # acceptance/v0.4.6
173169 with :
174170 vault_uri : ${{ secrets.VAULT_URI }}
175171 timeout : 2h
@@ -181,9 +177,11 @@ jobs:
181177 ARM_TENANT_ID : ${{ secrets.ARM_TENANT_ID }}
182178
183179 e2e_serverless :
184- if : github.event_name == 'pull_request' && !github.event.pull_request.draft && !github.event.pull_request.head.repo. fork
180+ needs : not-a- fork
185181 environment : tool
186- runs-on : larger
182+ runs-on :
183+ group : larger-runners
184+ labels : larger
187185 permissions :
188186 id-token : write
189187 pull-requests : write
@@ -195,21 +193,18 @@ jobs:
195193 with :
196194 fetch-depth : 0
197195
198- - name : Setup uv
199- uses : astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
200- with :
201- version : " 0.11.2"
202- checksum : " 7ac2ca0449c8d68dae9b99e635cd3bc9b22a4cb1de64b7c43716398447d42981"
196+ - name : Setup environment
197+ uses : ./.github/actions/setup-env
203198
204- - name : Setup for JFrog
205- uses : ./.github/actions/jfrog-auth
199+ - name : Pre-build DQX wheel
200+ uses : ./.github/actions/prebuild-wheel
206201
207202 # Required for DAB (Databricks Asset Bundle) e2e tests
208203 - name : Install Databricks CLI
209- uses : databricks/setup-cli@acd0e77a1ed7f15f528faca1e1f7f5590bcfdff8 # v0.296.0
204+ uses : databricks/setup-cli@596b0a354ba14aa59921aca1b02bd67c2b0a81a5 # v0.297.2
210205
211206 - name : Run e2e tests on serverless cluster
212- uses : databrickslabs/sandbox/acceptance@3313d06ce86227537b3f37f5974f7eecb2a8e59a # acceptance/v0.4.4
207+ uses : databrickslabs/sandbox/acceptance@83461e5dd7021feabb1a9ca3ee10d6f46b72092a # acceptance/v0.4.6
213208 with :
214209 vault_uri : ${{ secrets.VAULT_URI }}
215210 timeout : 2h
0 commit comments