@@ -17,15 +17,36 @@ permissions:
17
17
contents : read
18
18
19
19
jobs :
20
+ paths-filter :
21
+ runs-on : ubuntu-latest
22
+ outputs :
23
+ pythonChanges : ${{ steps.filter.outputs.python}}
24
+ steps :
25
+ - uses : actions/checkout@v3
26
+ - uses : dorny/paths-filter@v2
27
+ id : filter
28
+ with :
29
+ filters : |
30
+ python:
31
+ - 'python/**'
32
+ # run only if 'python' files were changed
33
+ - name : python tests
34
+ if : steps.filter.outputs.python == 'true'
35
+ run : echo "Python file"
36
+ # run only if not 'python' files were changed
37
+ - name : not python tests
38
+ if : steps.filter.outputs.python != 'true'
39
+ run : echo "NOT python file"
40
+
20
41
python-merge-gate :
21
- if : ${{ github.event_name != 'pull_request' && github.event_name != 'schedule'}}
42
+ if : ${{ github.event_name != 'pull_request' && github.event_name != 'schedule' && needs.paths-filter.outputs.pythonChanges == 'true' }}
22
43
runs-on : ${{ matrix.os }}
23
44
strategy :
24
45
max-parallel : 1
25
46
fail-fast : false
26
47
matrix :
27
48
python-version : ["3.11"]
28
- os : [windows-latest, ubuntu-latest, macos -latest]
49
+ os : [ubuntu-latest]
29
50
steps :
30
51
- uses : actions/checkout@v3
31
52
- name : Set up Python ${{ matrix.python-version }}
@@ -70,16 +91,10 @@ jobs:
70
91
AZURE_COGNITIVE_SEARCH_ENDPOINT : ${{secrets.AZURE_COGNITIVE_SEARCH_ENDPOINT}}
71
92
run : |
72
93
cd python
73
- poetry run pytest ./tests/integration/completions/test_azure_oai_chat_service.py -v
74
- poetry run pytest ./tests/integration/completions/test_oai_chat_service.py -v
75
- poetry run pytest ./tests/integration/completions/test_hf_local_text_completions.py -v
76
- poetry run pytest ./tests/integration/connectors/memory/test_chroma.py -v
77
- poetry run pytest ./tests/integration/connectors/memory/test_qdrant_memory_store.py -v
78
- poetry run pytest ./tests/integration/planning -v
79
- poetry run pytest ./tests/integration/embeddings -v
94
+ poetry run pytest ./tests/integration -v
80
95
81
96
python-integration-tests :
82
- if : ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
97
+ if : ${{ ( github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && needs.paths-filter.outputs.pythonChanges == 'true ' }}
83
98
runs-on : ${{ matrix.os }}
84
99
strategy :
85
100
max-parallel : 1
@@ -183,7 +198,7 @@ jobs:
183
198
184
199
- name : Microsoft Teams Notification
185
200
uses : skitionek/notify-microsoft-teams@master
186
- if : github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
201
+ if : github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
187
202
with :
188
203
webhook_url : ${{ secrets.MSTEAMS_WEBHOOK }}
189
204
dry_run : ${{ env.run_type != 'Daily' && env.run_type != 'Manual'}}
0 commit comments