Skip to content
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

Python: Better Integration Test Reporting #2420

Merged
merged 74 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from 66 commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
987b082
updated poetry to pick up latest chroma packages
awharrison-28 Aug 1, 2023
de25cc4
mark pinecone tests with xfails
awharrison-28 Aug 1, 2023
7d54804
remove defunct field from qdrant pointstruct
awharrison-28 Aug 1, 2023
067dc53
xfail raises should be tuple, not array
awharrison-28 Aug 1, 2023
1ba062e
fix qdrant test breaks
awharrison-28 Aug 1, 2023
fae4690
bump min qdrant version and update poetry lock with latest chroma
awharrison-28 Aug 1, 2023
3346802
added cleanup logic to ensure that the chroma db is deleted between t…
Aug 1, 2023
309a06d
decrease pinecone retry attempts, modify chroma test cleanup
Aug 1, 2023
61ba53b
reduce retries to 1, and decrease types of xfail errors allowed
Aug 1, 2023
c133d1d
remove database file before others as this has some conflicts on windows
Aug 1, 2023
c74363d
removed conditions for xfail on pinecone tests, added xfails to seque…
Aug 1, 2023
fbc2960
setup teams notifications
Aug 1, 2023
1a026a0
temp reduce matrix
Aug 1, 2023
39e5d8d
edits for multiline output to GH
Aug 1, 2023
4b0eb8f
define EOF
Aug 1, 2023
1d468bd
test results on windows and print output to console
Aug 1, 2023
7bb202e
add more matrix
Aug 1, 2023
b19e097
be more windows friendly?
Aug 1, 2023
82d76d6
be more windows friendly?
Aug 1, 2023
474e317
remove complicated logging
Aug 1, 2023
a3aefe4
delete collections from storage that is now persistent. Deleting the …
Aug 1, 2023
3c9b86b
trial run gh notification
Aug 1, 2023
d34dfcb
quick tests, temp shortening of tests
Aug 1, 2023
c6b83d8
remove dry run
Aug 1, 2023
f2d0712
fix typo
Aug 2, 2023
3ce55c3
modify push message
Aug 2, 2023
4f2caf3
modify push message
Aug 2, 2023
e4a05fb
modify push message
Aug 2, 2023
b640310
modify push message
Aug 2, 2023
b377425
modify push message
Aug 2, 2023
f9566d3
modify push message
Aug 2, 2023
9f20927
modify push message
Aug 2, 2023
f14c864
modify push message
Aug 2, 2023
7313916
modify push message
Aug 2, 2023
d02448f
modify push message
Aug 2, 2023
6b29441
modify push message
Aug 2, 2023
6428c2b
ready to go
Aug 2, 2023
554baa3
merge with main
Aug 2, 2023
938dfc2
pre-commit checks
Aug 2, 2023
7cad0b5
modify push message
Aug 2, 2023
cf1d92d
Merge remote-tracking branch 'origin/main' into feature-python-integr…
Aug 2, 2023
abc283e
modify push message
Aug 2, 2023
c3e5be1
Update python/semantic_kernel/connectors/memory/qdrant/qdrant_memory_…
awharrison-28 Aug 2, 2023
38c0f2d
formatting
Aug 2, 2023
79ed7f7
send single message to teams
Aug 2, 2023
6cbfa42
change titles to manual and nightly"
Aug 2, 2023
6f178f8
fix retry logic in sequential planner
Aug 2, 2023
b15e144
create custom retry function
Aug 2, 2023
a3ac33c
remove steps from github notify
Aug 2, 2023
e8a6a18
merge with main, update integration test conditions, report only work…
awharrison-28 Aug 10, 2023
30fcc8b
formatting
awharrison-28 Aug 10, 2023
41cb75d
add macos to merge gate matrix, fix more formatting
awharrison-28 Aug 10, 2023
05ad0eb
missing end of title indicator
awharrison-28 Aug 10, 2023
16b20cb
add check for job cancellations and added back link to workflow
awharrison-28 Aug 10, 2023
9ed5f85
get date in new job, remove scripting around integration test console…
awharrison-28 Aug 10, 2023
48a6525
always run teams notify
awharrison-28 Aug 10, 2023
54ce2dd
change azure deployment for embeddings for python tests
awharrison-28 Aug 10, 2023
2af9bf1
remove needs from step
awharrison-28 Aug 10, 2023
3d793e3
modify reporting message and add time
awharrison-28 Aug 10, 2023
d262eea
error in conditionals for run_type
awharrison-28 Aug 10, 2023
eda64f7
error in conditionals for run_type
awharrison-28 Aug 10, 2023
c1b039e
Merge branch 'main' into feature-python-integration-tests
awharrison-28 Aug 10, 2023
8257331
set run type differently
awharrison-28 Aug 10, 2023
4ef3709
set run_type always
awharrison-28 Aug 10, 2023
a088e62
don't notify teams on PR
awharrison-28 Aug 10, 2023
c07c13b
set dry run
awharrison-28 Aug 10, 2023
9ae88ad
Merge branch 'main' into feature-python-integration-tests
lemillermicrosoft Aug 14, 2023
e353c60
fixed typo in env
awharrison-28 Aug 16, 2023
da38c12
Merge branch 'feature-python-integration-tests' of https://github.com…
awharrison-28 Aug 16, 2023
7354fed
fixed typo in env
awharrison-28 Aug 16, 2023
53c4a8f
fixed typo in env
awharrison-28 Aug 16, 2023
8a817f0
Merge branch 'main' into feature-python-integration-tests
awharrison-28 Aug 16, 2023
2e63131
pre-commit checks
awharrison-28 Aug 16, 2023
46a7cae
Merge branch 'feature-python-integration-tests' of https://github.com…
awharrison-28 Aug 16, 2023
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
83 changes: 56 additions & 27 deletions .github/workflows/python-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ permissions:

jobs:
python-merge-gate:
if: ${{ github.event_name == 'merge_group' }}
if: ${{ github.event_name != 'pull_request' && github.event_name != 'schedule'}}
awharrison-28 marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 1
fail-fast: false
matrix:
python-version: ["3.11"]
os: [windows-latest, ubuntu-latest]
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -93,22 +93,22 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies with hnswlib native disabled
if: matrix.os == 'macos-latest' && matrix.python-version == '3.11'
run: |
export HNSWLIB_NO_NATIVE=1
python -m pip install --upgrade pip setuptools wheel
python -m pip install poetry pytest
cd python && poetry install

- name: Install dependencies with hnswlib native enabled
if: matrix.os != 'macos-latest' || matrix.python-version != '3.11'
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install poetry pytest
cd python && poetry install

- name: Run Integration Tests
id: run_tests
shell: bash
Expand All @@ -119,7 +119,7 @@ jobs:
AzureOpenAIEmbedding__Label: azure-text-embedding-ada-002
lemillermicrosoft marked this conversation as resolved.
Show resolved Hide resolved
AzureOpenAI__DeploymentName: ${{ vars.AZUREOPENAI__DEPLOYMENTNAME }}
AzureOpenAIChat__DeploymentName: ${{ vars.AZUREOPENAI__CHAT__DEPLOYMENTNAME }}
AzureOpenAIEmbeddings__DeploymentName: ${{ vars.AZUREOPENAIEMBEDDING__DEPLOYMENTNAME }}
AzureOpenAIEmbeddings__DeploymentName: ${{ vars.AZUREOPENAIEMBEDDING__DEPLOYMENTNAME2 }}
AzureOpenAI__Endpoint: ${{ secrets.AZUREOPENAI__ENDPOINT }}
AzureOpenAIEmbeddings__Endpoint: ${{ secrets.AZUREOPENAI__ENDPOINT }}
AzureOpenAI__ApiKey: ${{ secrets.AZUREOPENAI__APIKEY }}
Expand All @@ -133,31 +133,60 @@ jobs:
AZURE_COGNITIVE_SEARCH_ENDPOINT: ${{secrets.AZURE_COGNITIVE_SEARCH_ENDPOINT}}
run: |
cd python
echo "date=$(date +'%m/%d/%Y')" >> "$GITHUB_ENV"
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "Test Output<<$EOF" >> "$GITHUB_OUTPUT"
echo "$(poetry run pytest ./tests/integration)" >> "$GITHUB_OUTPUT"
echo "$EOF" >> "$GITHUB_OUTPUT"

poetry run pytest ./tests/integration -v
lemillermicrosoft marked this conversation as resolved.
Show resolved Hide resolved

# This final job is required to satisfy the merge queue. It must only run (or succeed) if no tests failed
python-integration-tests-check:
if: always()
runs-on: ubuntu-latest
strategy:
max-parallel: 1
fail-fast: false
needs: [python-merge-gate, python-integration-tests]
steps:
- name: Get Date
shell: bash
run: |
echo "date=$(date +'%m/%d/%Y %H:%M:%S')" >> "$GITHUB_ENV"

- name: Run Type is Daily
if: ${{ github.event_name == 'schedule' }}
shell: bash
run: |
echo "run_type=Daily" >> "$GITHUB_ENV"

- name: Run Type is Manual
if: ${{ github.event_name == 'workflow_dispatch' }}
shell: bash
run: |
echo "run_type=Manual" >> "$GITHUB_ENV"

- name: Run Type is Other
if: ${{ github.event_name != 'schedule' && github.event_name != 'workflow_dispatch'}}
shell: bash
run: |
echo "run_type=${{ github.event_name }}" >> "$GITHUB_ENV"

- name: Fail workflow if tests failed
id: check_tests_failed
if: contains(join(needs.*.result, ','), 'failed')
uses: actions/github-script@v6
with:
script: core.setFailed('Integration Tests Failed!')

- name: Fail workflow if tests cancelled
id: check_tests_cancelled
if: contains(join(needs.*.result, ','), 'cancelled')
uses: actions/github-script@v6
with:
script: core.setFailed('Integration Tests Cancelled!')

- name: Microsoft Teams Notification
uses: skitionek/notify-microsoft-teams@master
if: always()
with:
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }}
dry_run: False
needs: ${{ toJson(needs) }}
dry_run: ${{ env.run_type != 'Daily' && env.run_type != 'Manual'}}
job: ${{ toJson(job) }}
steps: ${{ toJson(steps) }}
overwrite: "{title: ` ${{ github.event_name }} ${{ steps.run_tests.outcome }}: ${{ env.date }} - ${{ matrix.python-version }} on ${{ matrix.os }}`, text: ` ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n${{ toJson(steps.run_tests.outputs) }}`}"

# This final job is required to satisfy the merge queue. It must only run (or succeed) if no tests failed
python-integration-tests-check:
runs-on: ubuntu-latest
if: always()
needs: [python-merge-gate, python-integration-tests]
steps:
- name: Fail workflow if tests failed
if: contains(join(needs.*.result, ','), 'failed')
uses: actions/github-script@v6
with:
script: core.setFailed('Integration Tests Failed!')
overwrite: "{title: ` ${{ env.run_type }}: ${{ env.date }} `, text: ` ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}`}"
Loading
Loading