|
1 | | -# SPDX-FileCopyrightText: Nextcloud contributors |
| 1 | +# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors |
2 | 2 | # SPDX-License-Identifier: AGPL-3.0-or-later |
3 | 3 |
|
4 | 4 | name: Integration test |
5 | 5 |
|
6 | 6 | on: |
7 | 7 | 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 |
17 | 10 | push: |
18 | 11 | branches: |
19 | 12 | - 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 |
29 | 16 |
|
30 | 17 | concurrency: |
31 | 18 | group: integration-test-${{ github.head_ref || github.run_id }} |
32 | 19 | cancel-in-progress: true |
33 | 20 |
|
34 | 21 |
|
35 | 22 | 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: |
37 | 54 | runs-on: ubuntu-22.04 |
38 | 55 |
|
| 56 | + needs: changes |
| 57 | + if: needs.changes.outputs.src != 'false' |
| 58 | + |
39 | 59 | strategy: |
40 | 60 | # do not stop on another job's failure |
41 | 61 | fail-fast: false |
@@ -238,4 +258,18 @@ jobs: |
238 | 258 | cat context_chat_backend/backend_logs || echo "No backend logs" |
239 | 259 | echo '--------------------------------------------------' |
240 | 260 | 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