Skip to content

Commit 2d166bd

Browse files
authored
Split integration tests from blocking the merge queue (#496)
There were many cases when GitHub bot was removing PR from the merge queue, possibly because of integration tests being flaky. This PR removes the chance of this flakiness by partitioning the integration tests into its own workflow file.
1 parent a817e0a commit 2d166bd

File tree

2 files changed

+53
-44
lines changed

2 files changed

+53
-44
lines changed

.github/workflows/acceptance.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: acceptance
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
7+
permissions:
8+
id-token: write
9+
contents: read
10+
pull-requests: write
11+
12+
env:
13+
HATCH_VERSION: 1.7.0
14+
15+
jobs:
16+
integration:
17+
if: github.event_name == 'pull_request'
18+
environment: account-admin
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout Code
22+
uses: actions/[email protected]
23+
24+
- name: Unshallow
25+
run: git fetch --prune --unshallow
26+
27+
- name: Install Python
28+
uses: actions/setup-python@v4
29+
with:
30+
cache: 'pip'
31+
cache-dependency-path: '**/pyproject.toml'
32+
python-version: '3.10'
33+
34+
- name: Install hatch
35+
run: pip install hatch==$HATCH_VERSION
36+
37+
- uses: azure/login@v1
38+
with:
39+
client-id: ${{ secrets.ARM_CLIENT_ID }}
40+
tenant-id: ${{ secrets.ARM_TENANT_ID }}
41+
subscription-id: ${{ secrets.ARM_SUBSCRIPTION_ID }}
42+
43+
- name: Run integration tests
44+
run: hatch run integration:test
45+
env:
46+
CLOUD_ENV: "${{ vars.CLOUD_ENV }}"
47+
DATABRICKS_HOST: "${{ secrets.DATABRICKS_HOST }}"
48+
DATABRICKS_ACCOUNT_ID: "${{ secrets.DATABRICKS_ACCOUNT_ID }}"
49+
DATABRICKS_CLUSTER_ID: "${{ vars.DATABRICKS_CLUSTER_ID }}"
50+
TEST_DEFAULT_CLUSTER_ID: "${{ vars.TEST_DEFAULT_CLUSTER_ID }}"
51+
TEST_DEFAULT_WAREHOUSE_ID: "${{ vars.TEST_DEFAULT_WAREHOUSE_ID }}"
52+
TEST_INSTANCE_POOL_ID: "${{ vars.TEST_INSTANCE_POOL_ID }}"
53+
TEST_LEGACY_TABLE_ACL_CLUSTER_ID: "${{ vars.TEST_LEGACY_TABLE_ACL_CLUSTER_ID }}"

.github/workflows/push.yml

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ on:
1414
branches:
1515
- main
1616

17-
permissions:
18-
id-token: write
19-
contents: read
20-
pull-requests: write
21-
2217
env:
2318
HATCH_VERSION: 1.7.0
2419

@@ -48,45 +43,6 @@ jobs:
4843
- name: Publish test coverage
4944
uses: codecov/codecov-action@v1
5045

51-
integration:
52-
if: github.event_name == 'pull_request'
53-
environment: account-admin
54-
runs-on: ubuntu-latest
55-
steps:
56-
- name: Checkout Code
57-
uses: actions/[email protected]
58-
59-
- name: Unshallow
60-
run: git fetch --prune --unshallow
61-
62-
- name: Install Python
63-
uses: actions/setup-python@v4
64-
with:
65-
cache: 'pip'
66-
cache-dependency-path: '**/pyproject.toml'
67-
python-version: '3.10'
68-
69-
- name: Install hatch
70-
run: pip install hatch==$HATCH_VERSION
71-
72-
- uses: azure/login@v1
73-
with:
74-
client-id: ${{ secrets.ARM_CLIENT_ID }}
75-
tenant-id: ${{ secrets.ARM_TENANT_ID }}
76-
subscription-id: ${{ secrets.ARM_SUBSCRIPTION_ID }}
77-
78-
- name: Run integration tests
79-
run: hatch run integration:test
80-
env:
81-
CLOUD_ENV: "${{ vars.CLOUD_ENV }}"
82-
DATABRICKS_HOST: "${{ secrets.DATABRICKS_HOST }}"
83-
DATABRICKS_ACCOUNT_ID: "${{ secrets.DATABRICKS_ACCOUNT_ID }}"
84-
DATABRICKS_CLUSTER_ID: "${{ vars.DATABRICKS_CLUSTER_ID }}"
85-
TEST_DEFAULT_CLUSTER_ID: "${{ vars.TEST_DEFAULT_CLUSTER_ID }}"
86-
TEST_DEFAULT_WAREHOUSE_ID: "${{ vars.TEST_DEFAULT_WAREHOUSE_ID }}"
87-
TEST_INSTANCE_POOL_ID: "${{ vars.TEST_INSTANCE_POOL_ID }}"
88-
TEST_LEGACY_TABLE_ACL_CLUSTER_ID: "${{ vars.TEST_LEGACY_TABLE_ACL_CLUSTER_ID }}"
89-
9046
fmt:
9147
runs-on: ubuntu-latest
9248
steps:

0 commit comments

Comments
 (0)