Skip to content

Commit e4cee84

Browse files
committed
Only run integration tests on Python changes
1 parent c85c9ee commit e4cee84

2 files changed

Lines changed: 181 additions & 140 deletions

File tree

.github/workflows/python-ci.yml

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

81-
integration-test:
82-
runs-on: ubuntu-latest
83-
steps:
84-
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
85-
with:
86-
persist-credentials: false
87-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
88-
with:
89-
python-version: '3.12'
90-
- name: Install UV
91-
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
92-
with:
93-
enable-cache: true
94-
- name: Install system dependencies
95-
run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for kerberos
96-
- name: Install
97-
run: make install
98-
- name: Run integration tests with coverage
99-
run: COVERAGE=1 make test-integration
100-
- name: Show debug logs
101-
if: ${{ failure() }}
102-
run: docker compose -f dev/docker-compose-integration.yml logs
103-
- name: Upload coverage data
104-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
105-
with:
106-
name: coverage-integration
107-
path: .coverage*
108-
include-hidden-files: true
109-
110-
integration-test-s3:
111-
runs-on: ubuntu-latest
112-
steps:
113-
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
114-
with:
115-
persist-credentials: false
116-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
117-
with:
118-
python-version: '3.12'
119-
- name: Install UV
120-
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
121-
with:
122-
enable-cache: true
123-
- name: Install system dependencies
124-
run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for kerberos
125-
- name: Install
126-
run: make install
127-
- name: Run s3 integration tests with coverage
128-
run: COVERAGE=1 make test-s3
129-
- name: Show debug logs
130-
if: ${{ failure() }}
131-
run: docker compose -f dev/docker-compose.yml logs
132-
- name: Upload coverage data
133-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
134-
with:
135-
name: coverage-s3
136-
path: .coverage*
137-
include-hidden-files: true
138-
139-
integration-test-adls:
140-
runs-on: ubuntu-latest
141-
steps:
142-
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
143-
with:
144-
persist-credentials: false
145-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
146-
with:
147-
python-version: '3.12'
148-
- name: Install UV
149-
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
150-
with:
151-
enable-cache: true
152-
- name: Install system dependencies
153-
run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for kerberos
154-
- name: Install
155-
run: make install
156-
- name: Run adls integration tests with coverage
157-
run: COVERAGE=1 make test-adls
158-
- name: Show debug logs
159-
if: ${{ failure() }}
160-
run: docker compose -f dev/docker-compose-azurite.yml logs
161-
- name: Upload coverage data
162-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
163-
with:
164-
name: coverage-adls
165-
path: .coverage*
166-
include-hidden-files: true
167-
168-
integration-test-gcs:
169-
runs-on: ubuntu-latest
170-
steps:
171-
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
172-
with:
173-
persist-credentials: false
174-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
175-
with:
176-
python-version: '3.12'
177-
- name: Install UV
178-
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
179-
with:
180-
enable-cache: true
181-
- name: Install system dependencies
182-
run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for kerberos
183-
- name: Install
184-
run: make install
185-
- name: Run gcs integration tests with coverage
186-
run: COVERAGE=1 make test-gcs
187-
- name: Show debug logs
188-
if: ${{ failure() }}
189-
run: docker compose -f dev/docker-compose-gcs-server.yml logs
190-
- name: Upload coverage data
191-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
192-
with:
193-
name: coverage-gcs
194-
path: .coverage*
195-
include-hidden-files: true
196-
197-
integration-coverage-report:
198-
runs-on: ubuntu-latest
199-
needs: [integration-test, integration-test-s3, integration-test-adls, integration-test-gcs]
200-
steps:
201-
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
202-
with:
203-
persist-credentials: false
204-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
205-
with:
206-
python-version: '3.12'
207-
- name: Install UV
208-
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
209-
with:
210-
enable-cache: true
211-
- name: Install dependencies
212-
run: uv sync --group dev
213-
- name: Download all coverage artifacts
214-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
215-
with:
216-
pattern: coverage-*
217-
merge-multiple: true
218-
- name: Generate coverage report (75%) # Coverage threshold should only increase over time — never decrease it!
219-
run: COVERAGE_FAIL_UNDER=75 make coverage-report
220-
22181
cibw-dev-env-smoke-test:
22282
runs-on: ubuntu-latest
22383
steps:
Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
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+
steps:
46+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
47+
with:
48+
persist-credentials: false
49+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
50+
with:
51+
python-version: '3.12'
52+
- name: Install UV
53+
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
54+
with:
55+
enable-cache: true
56+
- name: Install system dependencies
57+
run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for kerberos
58+
- name: Install
59+
run: make install
60+
- name: Run integration tests with coverage
61+
run: COVERAGE=1 make test-integration
62+
- name: Show debug logs
63+
if: ${{ failure() }}
64+
run: docker compose -f dev/docker-compose-integration.yml logs
65+
- name: Upload coverage data
66+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
67+
with:
68+
name: coverage-integration
69+
path: .coverage*
70+
include-hidden-files: true
71+
72+
integration-test-s3:
73+
runs-on: ubuntu-latest
74+
steps:
75+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
76+
with:
77+
persist-credentials: false
78+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
79+
with:
80+
python-version: '3.12'
81+
- name: Install UV
82+
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
83+
with:
84+
enable-cache: true
85+
- name: Install system dependencies
86+
run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for kerberos
87+
- name: Install
88+
run: make install
89+
- name: Run s3 integration tests with coverage
90+
run: COVERAGE=1 make test-s3
91+
- name: Show debug logs
92+
if: ${{ failure() }}
93+
run: docker compose -f dev/docker-compose.yml logs
94+
- name: Upload coverage data
95+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
96+
with:
97+
name: coverage-s3
98+
path: .coverage*
99+
include-hidden-files: true
100+
101+
integration-test-adls:
102+
runs-on: ubuntu-latest
103+
steps:
104+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
105+
with:
106+
persist-credentials: false
107+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
108+
with:
109+
python-version: '3.12'
110+
- name: Install UV
111+
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
112+
with:
113+
enable-cache: true
114+
- name: Install system dependencies
115+
run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for kerberos
116+
- name: Install
117+
run: make install
118+
- name: Run adls integration tests with coverage
119+
run: COVERAGE=1 make test-adls
120+
- name: Show debug logs
121+
if: ${{ failure() }}
122+
run: docker compose -f dev/docker-compose-azurite.yml logs
123+
- name: Upload coverage data
124+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
125+
with:
126+
name: coverage-adls
127+
path: .coverage*
128+
include-hidden-files: true
129+
130+
integration-test-gcs:
131+
runs-on: ubuntu-latest
132+
steps:
133+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
134+
with:
135+
persist-credentials: false
136+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
137+
with:
138+
python-version: '3.12'
139+
- name: Install UV
140+
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
141+
with:
142+
enable-cache: true
143+
- name: Install system dependencies
144+
run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for kerberos
145+
- name: Install
146+
run: make install
147+
- name: Run gcs integration tests with coverage
148+
run: COVERAGE=1 make test-gcs
149+
- name: Show debug logs
150+
if: ${{ failure() }}
151+
run: docker compose -f dev/docker-compose-gcs-server.yml logs
152+
- name: Upload coverage data
153+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
154+
with:
155+
name: coverage-gcs
156+
path: .coverage*
157+
include-hidden-files: true
158+
159+
integration-coverage-report:
160+
runs-on: ubuntu-latest
161+
needs: [integration-test, integration-test-s3, integration-test-adls, integration-test-gcs]
162+
steps:
163+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
164+
with:
165+
persist-credentials: false
166+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
167+
with:
168+
python-version: '3.12'
169+
- name: Install UV
170+
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
171+
with:
172+
enable-cache: true
173+
- name: Install dependencies
174+
run: uv sync --group dev
175+
- name: Download all coverage artifacts
176+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
177+
with:
178+
pattern: coverage-*
179+
merge-multiple: true
180+
- name: Generate coverage report (75%) # Coverage threshold should only increase over time — never decrease it!
181+
run: COVERAGE_FAIL_UNDER=75 make coverage-report

0 commit comments

Comments
 (0)