Skip to content

Update python-integration-tests.yml #2533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 23, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 25 additions & 10 deletions .github/workflows/python-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,29 @@ permissions:
contents: read

jobs:
paths-filter:
runs-on: ubuntu-latest
outputs:
pythonChanges: ${{ steps.filter.outputs.python}}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
python:
- 'python/**'
# run only if 'python' files were changed
- name: python tests
if: steps.filter.outputs.python == 'true'
run: echo "Python file"
# run only if not 'python' files were changed
- name: not python tests
if: steps.filter.outputs.python != 'true'
run: echo "NOT python file"

python-merge-gate:
if: ${{ github.event_name != 'pull_request' && github.event_name != 'schedule'}}
if: ${{ github.event_name != 'pull_request' && github.event_name != 'schedule' && needs.paths-filter.outputs.pythonChanges == 'true' }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like this didn't work quite right... Maybe I'm missing something.

https://github.com/microsoft/semantic-kernel/actions/runs/5955500956/job/16154270036

Copy link
Member

@lemillermicrosoft lemillermicrosoft Aug 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if: ${{ github.event_name != 'pull_request' && github.event_name != 'schedule' && needs.paths-filter.outputs.pythonChanges == 'true' }}
if: github.event_name != 'pull_request' && github.event_name != 'schedule' && needs.paths-filter.outputs.pythonChanges == 'true'

runs-on: ${{ matrix.os }}
strategy:
max-parallel: 1
Expand Down Expand Up @@ -70,16 +91,10 @@ jobs:
AZURE_COGNITIVE_SEARCH_ENDPOINT: ${{secrets.AZURE_COGNITIVE_SEARCH_ENDPOINT}}
run: |
cd python
poetry run pytest ./tests/integration/completions/test_azure_oai_chat_service.py -v
poetry run pytest ./tests/integration/completions/test_oai_chat_service.py -v
poetry run pytest ./tests/integration/completions/test_hf_local_text_completions.py -v
poetry run pytest ./tests/integration/connectors/memory/test_chroma.py -v
poetry run pytest ./tests/integration/connectors/memory/test_qdrant_memory_store.py -v
poetry run pytest ./tests/integration/planning -v
poetry run pytest ./tests/integration/embeddings -v
poetry run pytest ./tests/integration -v

python-integration-tests:
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
if: ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && needs.paths-filter.outputs.pythonChanges == 'true' }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if: ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && needs.paths-filter.outputs.pythonChanges == 'true' }}
if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && needs.paths-filter.outputs.pythonChanges == 'true'

runs-on: ${{ matrix.os }}
strategy:
max-parallel: 1
Expand Down Expand Up @@ -183,7 +198,7 @@ jobs:

- name: Microsoft Teams Notification
uses: skitionek/notify-microsoft-teams@master
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
with:
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }}
dry_run: ${{ env.run_type != 'Daily' && env.run_type != 'Manual'}}
Expand Down