Skip to content

Commit

Permalink
Create python-integration-tests.yml (microsoft#763)
Browse files Browse the repository at this point in the history
### 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
awharrison-28 authored May 4, 2023
1 parent d927ce5 commit afdc1a6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ on:
branches: [ "main", "feature*" ]

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

Expand All @@ -32,8 +32,8 @@ jobs:
matrix:
python-version: ["3.8"]
runs-on: ubuntu-latest
needs: paths-filter
if: needs.paths-filter.outputs.output1 == 'true'
needs: check-for-python-changes
if: needs.check-for-python-changes.outputs.output1 == 'true'
timeout-minutes: 5
steps:
- run: echo "/root/.local/bin" >> $GITHUB_PATH
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/node-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
pull_request:
branches: ["main"]
paths:
- "samples/"
- 'samples/**'

jobs:
build:
Expand Down

0 comments on commit afdc1a6

Please sign in to comment.