Skip to content

Commit 1173e45

Browse files
authored
Only run integration tests on Python changes (#3610)
<!-- Thanks for opening a pull request! --> <!-- In the case this PR will resolve an issue, please replace ${GITHUB_ISSUE_ID} below with the actual Github issue id. --> <!-- Closes #${GITHUB_ISSUE_ID} --> # Rationale for this change I noticed on my AGENTS.md change that it ran the integration tests. We haven't (yet) reached issues from ASF on runner usage, but this is a really easy win. Markdown changes shouldn't trigger integration tests. ## Are these changes tested? Expecting a no-op. ## Are there any user-facing changes? <!-- In the case of user-facing changes, please add the changelog label. -->
1 parent b697b02 commit 1173e45

2 files changed

Lines changed: 185 additions & 144 deletions

File tree

.github/workflows/python-ci.yml

Lines changed: 0 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -79,150 +79,6 @@ jobs:
7979
- name: Generate coverage report (85%) # Coverage threshold should only increase over time — never decrease it!
8080
run: COVERAGE_FAIL_UNDER=85 make coverage-report
8181

82-
integration-test:
83-
runs-on: ubuntu-latest
84-
timeout-minutes: 20
85-
steps:
86-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
87-
with:
88-
persist-credentials: false
89-
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
90-
with:
91-
python-version: '3.12'
92-
- name: Install UV
93-
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
94-
with:
95-
enable-cache: true
96-
- name: Install system dependencies
97-
run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for kerberos
98-
- name: Install
99-
run: make install
100-
- name: Run integration tests with coverage
101-
run: COVERAGE=1 make test-integration
102-
- name: Show debug logs
103-
if: ${{ failure() }}
104-
run: docker compose -f dev/docker-compose-integration.yml logs
105-
- name: Upload coverage data
106-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
107-
with:
108-
name: coverage-integration
109-
path: .coverage*
110-
include-hidden-files: true
111-
112-
integration-test-s3:
113-
runs-on: ubuntu-latest
114-
timeout-minutes: 10
115-
steps:
116-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
117-
with:
118-
persist-credentials: false
119-
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
120-
with:
121-
python-version: '3.12'
122-
- name: Install UV
123-
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
124-
with:
125-
enable-cache: true
126-
- name: Install system dependencies
127-
run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for kerberos
128-
- name: Install
129-
run: make install
130-
- name: Run s3 integration tests with coverage
131-
run: COVERAGE=1 make test-s3
132-
- name: Show debug logs
133-
if: ${{ failure() }}
134-
run: docker compose -f dev/docker-compose.yml logs
135-
- name: Upload coverage data
136-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
137-
with:
138-
name: coverage-s3
139-
path: .coverage*
140-
include-hidden-files: true
141-
142-
integration-test-adls:
143-
runs-on: ubuntu-latest
144-
timeout-minutes: 10
145-
steps:
146-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
147-
with:
148-
persist-credentials: false
149-
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
150-
with:
151-
python-version: '3.12'
152-
- name: Install UV
153-
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
154-
with:
155-
enable-cache: true
156-
- name: Install system dependencies
157-
run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for kerberos
158-
- name: Install
159-
run: make install
160-
- name: Run adls integration tests with coverage
161-
run: COVERAGE=1 make test-adls
162-
- name: Show debug logs
163-
if: ${{ failure() }}
164-
run: docker compose -f dev/docker-compose-azurite.yml logs
165-
- name: Upload coverage data
166-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
167-
with:
168-
name: coverage-adls
169-
path: .coverage*
170-
include-hidden-files: true
171-
172-
integration-test-gcs:
173-
runs-on: ubuntu-latest
174-
timeout-minutes: 10
175-
steps:
176-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
177-
with:
178-
persist-credentials: false
179-
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
180-
with:
181-
python-version: '3.12'
182-
- name: Install UV
183-
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
184-
with:
185-
enable-cache: true
186-
- name: Install system dependencies
187-
run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for kerberos
188-
- name: Install
189-
run: make install
190-
- name: Run gcs integration tests with coverage
191-
run: COVERAGE=1 make test-gcs
192-
- name: Show debug logs
193-
if: ${{ failure() }}
194-
run: docker compose -f dev/docker-compose-gcs-server.yml logs
195-
- name: Upload coverage data
196-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
197-
with:
198-
name: coverage-gcs
199-
path: .coverage*
200-
include-hidden-files: true
201-
202-
integration-coverage-report:
203-
runs-on: ubuntu-latest
204-
needs: [integration-test, integration-test-s3, integration-test-adls, integration-test-gcs]
205-
steps:
206-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
207-
with:
208-
persist-credentials: false
209-
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
210-
with:
211-
python-version: '3.12'
212-
- name: Install UV
213-
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
214-
with:
215-
enable-cache: true
216-
- name: Install dependencies
217-
run: uv sync --group dev
218-
- name: Download all coverage artifacts
219-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
220-
with:
221-
pattern: coverage-*
222-
merge-multiple: true
223-
- name: Generate coverage report (75%) # Coverage threshold should only increase over time — never decrease it!
224-
run: COVERAGE_FAIL_UNDER=75 make coverage-report
225-
22682
cibw-dev-env-smoke-test:
22783
runs-on: ubuntu-latest
22884
steps:
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
20+
name: "Python Integration"
21+
22+
on:
23+
push:
24+
branches:
25+
- 'main'
26+
pull_request:
27+
paths: # Only run integration tests when Python (or the code they exercise) changes.
28+
- '**/*.py'
29+
- 'pyproject.toml'
30+
- 'uv.lock'
31+
- 'Makefile'
32+
- 'dev/**' # docker-compose files and fixtures used by the integration suites.
33+
- '.github/workflows/python-integration.yml' # this file itself.
34+
35+
permissions:
36+
contents: read
37+
38+
concurrency:
39+
group: ${{ github.workflow }}-${{ github.ref }}
40+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
41+
42+
jobs:
43+
integration-test:
44+
runs-on: ubuntu-latest
45+
timeout-minutes: 20
46+
steps:
47+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
48+
with:
49+
persist-credentials: false
50+
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
51+
with:
52+
python-version: '3.12'
53+
- name: Install UV
54+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
55+
with:
56+
enable-cache: true
57+
- name: Install system dependencies
58+
run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for kerberos
59+
- name: Install
60+
run: make install
61+
- name: Run integration tests with coverage
62+
run: COVERAGE=1 make test-integration
63+
- name: Show debug logs
64+
if: ${{ failure() }}
65+
run: docker compose -f dev/docker-compose-integration.yml logs
66+
- name: Upload coverage data
67+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
68+
with:
69+
name: coverage-integration
70+
path: .coverage*
71+
include-hidden-files: true
72+
73+
integration-test-s3:
74+
runs-on: ubuntu-latest
75+
timeout-minutes: 10
76+
steps:
77+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
78+
with:
79+
persist-credentials: false
80+
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
81+
with:
82+
python-version: '3.12'
83+
- name: Install UV
84+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
85+
with:
86+
enable-cache: true
87+
- name: Install system dependencies
88+
run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for kerberos
89+
- name: Install
90+
run: make install
91+
- name: Run s3 integration tests with coverage
92+
run: COVERAGE=1 make test-s3
93+
- name: Show debug logs
94+
if: ${{ failure() }}
95+
run: docker compose -f dev/docker-compose.yml logs
96+
- name: Upload coverage data
97+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
98+
with:
99+
name: coverage-s3
100+
path: .coverage*
101+
include-hidden-files: true
102+
103+
integration-test-adls:
104+
runs-on: ubuntu-latest
105+
timeout-minutes: 10
106+
steps:
107+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
108+
with:
109+
persist-credentials: false
110+
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
111+
with:
112+
python-version: '3.12'
113+
- name: Install UV
114+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
115+
with:
116+
enable-cache: true
117+
- name: Install system dependencies
118+
run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for kerberos
119+
- name: Install
120+
run: make install
121+
- name: Run adls integration tests with coverage
122+
run: COVERAGE=1 make test-adls
123+
- name: Show debug logs
124+
if: ${{ failure() }}
125+
run: docker compose -f dev/docker-compose-azurite.yml logs
126+
- name: Upload coverage data
127+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
128+
with:
129+
name: coverage-adls
130+
path: .coverage*
131+
include-hidden-files: true
132+
133+
integration-test-gcs:
134+
runs-on: ubuntu-latest
135+
timeout-minutes: 10
136+
steps:
137+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
138+
with:
139+
persist-credentials: false
140+
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
141+
with:
142+
python-version: '3.12'
143+
- name: Install UV
144+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
145+
with:
146+
enable-cache: true
147+
- name: Install system dependencies
148+
run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for kerberos
149+
- name: Install
150+
run: make install
151+
- name: Run gcs integration tests with coverage
152+
run: COVERAGE=1 make test-gcs
153+
- name: Show debug logs
154+
if: ${{ failure() }}
155+
run: docker compose -f dev/docker-compose-gcs-server.yml logs
156+
- name: Upload coverage data
157+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
158+
with:
159+
name: coverage-gcs
160+
path: .coverage*
161+
include-hidden-files: true
162+
163+
integration-coverage-report:
164+
runs-on: ubuntu-latest
165+
needs: [integration-test, integration-test-s3, integration-test-adls, integration-test-gcs]
166+
steps:
167+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
168+
with:
169+
persist-credentials: false
170+
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
171+
with:
172+
python-version: '3.12'
173+
- name: Install UV
174+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
175+
with:
176+
enable-cache: true
177+
- name: Install dependencies
178+
run: uv sync --group dev
179+
- name: Download all coverage artifacts
180+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
181+
with:
182+
pattern: coverage-*
183+
merge-multiple: true
184+
- name: Generate coverage report (75%) # Coverage threshold should only increase over time — never decrease it!
185+
run: COVERAGE_FAIL_UNDER=75 make coverage-report

0 commit comments

Comments
 (0)