Skip to content

Commit 4ee96cf

Browse files
committed
fix: allow workflow to run on all paths to keep it required
Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
1 parent 2b42c8a commit 4ee96cf

1 file changed

Lines changed: 54 additions & 21 deletions

File tree

.github/workflows/integration-test.yml

Lines changed: 54 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,60 @@
1-
# SPDX-FileCopyrightText: Nextcloud contributors
1+
# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
22
# SPDX-License-Identifier: AGPL-3.0-or-later
33

44
name: Integration test
55

66
on:
77
pull_request:
8-
paths:
9-
- main.py
10-
- config.cpu.yaml
11-
- config.gpu.yaml
12-
- context_chat_backend/**
13-
- appinfo/**
14-
- example.env
15-
- hwdetect.sh
16-
- persistent_storage/**
8+
branches:
9+
- master
1710
push:
1811
branches:
1912
- master
20-
paths:
21-
- main.py
22-
- config.cpu.yaml
23-
- config.gpu.yaml
24-
- context_chat_backend/**
25-
- appinfo/**
26-
- example.env
27-
- hwdetect.sh
28-
- persistent_storage/**
13+
14+
permissions:
15+
contents: read
2916

3017
concurrency:
3118
group: integration-test-${{ github.head_ref || github.run_id }}
3219
cancel-in-progress: true
3320

3421

3522
jobs:
36-
transcription:
23+
changes:
24+
runs-on: ubuntu-latest
25+
permissions:
26+
contents: read
27+
pull-requests: read
28+
29+
outputs:
30+
src: ${{ steps.changes.outputs.src}}
31+
32+
steps:
33+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
34+
id: changes
35+
continue-on-error: true
36+
with:
37+
filters: |
38+
src:
39+
- 'main.py'
40+
- 'main_em.py'
41+
- 'config.cpu.yaml'
42+
- 'config.gpu.yaml'
43+
- 'context_chat_backend/**'
44+
- 'appinfo/**'
45+
- 'example.env'
46+
- 'hwdetect.sh'
47+
- 'persistent_storage/**'
48+
- 'project.toml'
49+
- 'requirements.txt'
50+
- 'logger_config.yaml'
51+
52+
integration:
3753
runs-on: ubuntu-22.04
3854

55+
needs: changes
56+
if: needs.changes.outputs.src != 'false'
57+
3958
strategy:
4059
# do not stop on another job's failure
4160
fail-fast: false
@@ -238,4 +257,18 @@ jobs:
238257
cat context_chat_backend/backend_logs || echo "No backend logs"
239258
echo '--------------------------------------------------'
240259
tail -v -n +1 context_chat_backend/persistent_storage/logs/* || echo "No logs in logs directory"
241-
260+
261+
summary:
262+
permissions:
263+
contents: none
264+
runs-on: ubuntu-latest-low
265+
needs: [changes, integration]
266+
267+
if: always()
268+
269+
# This is the summary, we just avoid to rename it so that branch protection rules still match
270+
name: integration-test
271+
272+
steps:
273+
- name: Summary status
274+
run: if ${{ needs.changes.outputs.src != 'false' && needs.integration.result != 'success' }}; then exit 1; fi

0 commit comments

Comments
 (0)