Skip to content

Commit 2e595d9

Browse files
committed
Move logic to e2e-matrix
1 parent f5843b0 commit 2e595d9

1 file changed

Lines changed: 15 additions & 21 deletions

File tree

.github/workflows/run_tests.yml

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,23 @@ jobs:
145145
steps:
146146
- name: Set up Git repository
147147
uses: actions/checkout@v4
148+
with:
149+
fetch-depth: 0
150+
151+
- name: Get all changed files
152+
id: changed-files
153+
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
154+
with:
155+
files: |
156+
tesseract_core/**
157+
tests/endtoend_tests/**
158+
demo/**
159+
examples/**
160+
production.uv.lock
161+
.github/workflows/run_tests.yml
148162
149163
- name: Get available unit Tesseracts
164+
if: steps.changed-files.outputs.any_changed == 'true'
150165
id: get-matrix
151166
env:
152167
E2E_TEST_DIR: examples
@@ -211,21 +226,6 @@ jobs:
211226
steps:
212227
- name: Set up Git repository
213228
uses: actions/checkout@v4
214-
with:
215-
# Assume PRs are less than 50 commits
216-
fetch-depth: 50
217-
218-
- name: Get all changed files
219-
id: changed-files
220-
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
221-
with:
222-
files: |
223-
tesseract_core/**
224-
tests/endtoend_tests/**
225-
demo/**
226-
examples/**
227-
production.uv.lock
228-
.github/workflows/run_tests.yml
229229

230230
# Use Conda to install Python (setup-python action doesn't support ARM)
231231
- uses: conda-incubator/setup-miniconda@v3
@@ -234,22 +234,18 @@ jobs:
234234
python-version: ${{ matrix.python-version }}
235235

236236
- name: Set up uv
237-
if: steps.changed-files.outputs.any_changed == 'true'
238237
uses: astral-sh/setup-uv@v6
239238
with:
240239
enable-cache: true
241240

242241
- name: Restore UV environment
243-
if: steps.changed-files.outputs.any_changed == 'true'
244242
run: cp production.uv.lock uv.lock
245243

246244
- name: Install package
247-
if: steps.changed-files.outputs.any_changed == 'true'
248245
run: |
249246
uv sync --extra dev --frozen
250247
251248
- name: Set up Podman
252-
if: steps.changed-files.outputs.any_changed == 'true' && matrix.docker-engine == 'podman'
253249
run: |
254250
systemctl start --user podman.socket
255251
systemctl status --user podman.socket
@@ -263,7 +259,6 @@ jobs:
263259
echo "TESSERACT_DOCKER_BUILD_ARGS=" >> $GITHUB_ENV
264260
265261
- name: Run test suite
266-
if: steps.changed-files.outputs.any_changed == 'true'
267262
run: |
268263
if [ "${{ matrix.unit-tesseract }}" == "base" ]; then
269264
uv run --no-sync pytest \
@@ -284,7 +279,6 @@ jobs:
284279
fi
285280
286281
- name: Upload coverage reports to Codecov
287-
if: steps.changed-files.outputs.any_changed == 'true'
288282
uses: codecov/codecov-action@v5.4.3
289283
with:
290284
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)