Skip to content

Commit e1b13b1

Browse files
shawncalawharrison-28lemillermicrosoft
authored andcommitted
Update python-integration-tests.yml (microsoft#2533)
Adding back the paths filter on the Python integration tests GitHub actions. This ensures that the tests only run when changes under the python/ folder are included. Otherwise, it skips to the final validation step. --------- Co-authored-by: Abby Harrison <[email protected]> Co-authored-by: Abby Harrison <[email protected]> Co-authored-by: Lee Miller <[email protected]>
1 parent 2dea228 commit e1b13b1

File tree

1 file changed

+26
-11
lines changed

1 file changed

+26
-11
lines changed

.github/workflows/python-integration-tests.yml

+26-11
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,36 @@ permissions:
1717
contents: read
1818

1919
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+
2041
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' }}
2243
runs-on: ${{ matrix.os }}
2344
strategy:
2445
max-parallel: 1
2546
fail-fast: false
2647
matrix:
2748
python-version: ["3.11"]
28-
os: [windows-latest, ubuntu-latest, macos-latest]
49+
os: [ubuntu-latest]
2950
steps:
3051
- uses: actions/checkout@v3
3152
- name: Set up Python ${{ matrix.python-version }}
@@ -70,16 +91,10 @@ jobs:
7091
AZURE_COGNITIVE_SEARCH_ENDPOINT: ${{secrets.AZURE_COGNITIVE_SEARCH_ENDPOINT}}
7192
run: |
7293
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
8095
8196
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' }}
8398
runs-on: ${{ matrix.os }}
8499
strategy:
85100
max-parallel: 1
@@ -183,7 +198,7 @@ jobs:
183198

184199
- name: Microsoft Teams Notification
185200
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'
187202
with:
188203
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }}
189204
dry_run: ${{ env.run_type != 'Daily' && env.run_type != 'Manual'}}

0 commit comments

Comments
 (0)