-
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.
Python: small improvements in test running (#7576)
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Adds pytest-xdist to parallelize tests, defaults to logical cores Adds single test for Kernel to validate. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄
- Loading branch information
1 parent
7997e79
commit b1690ce
Showing
8 changed files
with
155 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,10 +10,6 @@ on: | |
types: | ||
- in_progress | ||
|
||
env: | ||
PYTHON_VERSION: "3.10" | ||
RUN_OS: ubuntu-latest | ||
|
||
jobs: | ||
python-tests-coverage: | ||
runs-on: ubuntu-latest | ||
|
@@ -27,13 +23,13 @@ jobs: | |
uses: lewagon/[email protected] | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
check-name: 'Python Unit Tests (${{ env.PYTHON_VERSION }}, ${{ env.RUN_OS }}, false)' | ||
check-name: 'Python Test Coverage' | ||
repo-token: ${{ secrets.GH_ACTIONS_PR_WRITE }} | ||
wait-interval: 90 | ||
allowed-conclusions: success | ||
- uses: actions/checkout@v4 | ||
- name: Setup filename variables | ||
run: echo "FILE_ID=${{ github.event.number }}-${{ env.RUN_OS }}-${{ env.PYTHON_VERSION }}" >> $GITHUB_ENV | ||
run: echo "FILE_ID=${{ github.event.number }}" >> $GITHUB_ENV | ||
- name: Download coverage | ||
uses: dawidd6/action-download-artifact@v3 | ||
with: | ||
|
@@ -57,9 +53,9 @@ jobs: | |
github-token: ${{ secrets.GH_ACTIONS_PR_WRITE }} | ||
pytest-coverage-path: python-coverage.txt | ||
coverage-path-prefix: "python/" | ||
title: "Python ${{ env.PYTHON_VERSION }} Test Coverage Report" | ||
badge-title: "Py${{ env.PYTHON_VERSION }} Test Coverage" | ||
junitxml-title: "Python ${{ env.PYTHON_VERSION }} Unit Test Overview" | ||
title: "Python Test Coverage Report" | ||
badge-title: "Python Test Coverage" | ||
junitxml-title: "Python Unit Test Overview" | ||
junitxml-path: pytest.xml | ||
default-branch: "main" | ||
unique-id-for-comment: python-${{ env.PYTHON_VERSION }} | ||
unique-id-for-comment: python-test-coverage |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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