-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create python-integration-tests.yml (#763)
### Motivation and Context Run python integration tests on every push to main, and every 12 hours. These integration tests will run on every push to main as well as twice a day. At the time of this PR, we are seeing ~3 PRs to the python SK per day. Each Integration test run will make ~32 AI requests. For each PR, 12 runs will be made: 3 each for python 3.8, 3.9, 3.10, and 3.11 for a total of ~400 calls per push to main. We should re-evaluate the trigger on pushes to main if PRs to the python SK significantly increase. ### Description - add workflow definition for integration tests - Example run: https://github.com/microsoft/semantic-kernel/actions/runs/4874609026/jobs/8695771345?pr=763 - For push triggers, add path checks for dotnet/** or python/** depending on the type of workflow - pinned requirements.txt dependencies to the versions pinned in the pyproject.toml file to ensure parity between pip package dependencies and local code **Note**: Integration tests are failing on windows with python 3.8 - already captured a task to address the problem
- Loading branch information
1 parent
46e4440
commit 05c586b
Showing
18 changed files
with
165 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ on: | |
pull_request: | ||
branches: ["main"] | ||
paths: | ||
- "samples/" | ||
- 'samples/**' | ||
|
||
jobs: | ||
build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# | ||
# This workflow will run all python integrations tests. | ||
# | ||
|
||
name: Python Integration Tests | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ "main"] | ||
paths: | ||
- 'python/**' | ||
schedule: | ||
- cron: '0 */12 * * *' # Run every 12 hours: midnight UTC and noon UTC | ||
|
||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
python-integration-tests: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
os: [ ubuntu-latest, windows-latest, macos-latest ] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install poetry pytest | ||
cd python && poetry install | ||
- name: Run Integration Tests | ||
shell: bash | ||
env: # Set Azure credentials secret as an input | ||
Python_Integration_Tests: Python_Integration_Tests | ||
AzureOpenAI__Label: azure-text-davinci-003 | ||
AzureOpenAIEmbedding__Label: azure-text-embedding-ada-002 | ||
AzureOpenAI__DeploymentName: ${{ vars.AZUREOPENAI__DEPLOYMENTNAME }} | ||
AzureOpenAIChat__DeploymentName: ${{ vars.AZUREOPENAI__CHAT__DEPLOYMENTNAME }} | ||
AzureOpenAIEmbeddings__DeploymentName: ${{ vars.AZUREOPENAIEMBEDDING__DEPLOYMENTNAME }} | ||
AzureOpenAI__Endpoint: ${{ secrets.AZUREOPENAI__ENDPOINT }} | ||
AzureOpenAIEmbeddings__Endpoint: ${{ secrets.AZUREOPENAI__ENDPOINT }} | ||
AzureOpenAI__ApiKey: ${{ secrets.AZUREOPENAI__APIKEY }} | ||
AzureOpenAIEmbeddings__ApiKey: ${{ secrets.AZUREOPENAI__APIKEY }} | ||
Bing__ApiKey: ${{ secrets.BING__APIKEY }} | ||
OpenAI__ApiKey: ${{ secrets.OPENAI__APIKEY }} | ||
run: | | ||
cd python | ||
poetry run pytest ./tests/integration | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
openai==0.27.* | ||
numpy==1.24.* | ||
aiofiles>=23.1.0 | ||
transformers>=4.28.0 | ||
sentence-transformers>=2.2.2 | ||
torch>=2.0.0 | ||
openai==0.27.0 | ||
numpy==1.24.2 | ||
aiofiles==23.1.0 | ||
transformers==4.28.0 | ||
sentence-transformers==2.2.2 | ||
torch==2.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.