Skip to content

Commit d915a9f

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 d915a9f

1 file changed

Lines changed: 55 additions & 21 deletions

File tree

.github/workflows/integration-test.yml

Lines changed: 55 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,61 @@
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+
- '.github/workflows/integration-test.yml'
52+
53+
integration:
3754
runs-on: ubuntu-22.04
3855

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

0 commit comments

Comments
 (0)