workflow: Add unit tests and reporting results workflows - #64
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
Pull request overview
This PR introduces reusable GitHub Actions workflows to run unit tests across multiple OS/Python versions and to publish aggregated JUnit results back to GitHub checks/PRs, then wires those workflows into the main CI workflow.
Changes:
- Added
run_unit_tests.ymlreusable workflow to execute pytest (with coverage) and upload JUnit XML artifacts. - Added
report_test_results.ymlreusable workflow to download those artifacts and publish results viapublish-unit-test-result-action. - Updated
CI.ymlto invoke unit tests and test reporting.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| .github/workflows/run_unit_tests.yml | New reusable workflow to run pytest across a matrix and upload JUnit XML artifacts. |
| .github/workflows/report_test_results.yml | New reusable workflow to download artifacts and publish unit test results to GitHub. |
| .github/workflows/CI.yml | Enables the new unit test + reporting workflows as part of CI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3485d49 to
059cebc
Compare
Test Results 14 files 14 suites 16m 3s ⏱️ Results for commit 586ea76. ♻️ This comment has been updated with latest results. |
059cebc to
c6e5870
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
.github/workflows/CI.yml:40
- Indentation under
report_test_results:is inconsistent with the rest of the workflow. Normalizing it to the same indentation style as other jobs reduces the risk of accidental YAML structure mistakes during future edits.
report_test_results:
name: Report test results
uses: ./.github/workflows/report_test_results.yml
needs: [run_unit_tests]
if: always()
8717476 to
d91112d
Compare
* Update CI workflow to run unit tests and report results * Create run_unit_tests workflow to run on Windows and Ubuntu * Create report_test_results workflow to report test results --------- Signed-off-by: zoechanzy <zoe.chan@emerson.com>
* Remove test_installdriver step from run_unit_tests.yml workflow * The nislsc package doesn't have it. --------- Signed-off-by: zoechanzy <zoe.chan@emerson.com>
* Update run_unit_tests.yml to include Python 3.14 in the test matrix. --------- Signed-off-by: zoechanzy <zoe.chan@emerson.com>
6059bbf to
1ebc733
Compare
* Add check_workflows.yml to CI and PR workflows * Add check_succeeded job to CI workflow * Add permissions to check_workflows.yml, CI.yml, and PR.yml --------- Signed-off-by: zoechanzy <zoe.chan@emerson.com>
1ebc733 to
ff769c2
Compare
* Disable advanced security for Run zizmor * Remove security-events: write of check_workflows.yml --------- Signed-off-by: zoechanzy <zoe.chan@emerson.com>
… in zizmor
* Added content: read permissions CI workflow.
* Added permission: {} to checks succeeded job in CI workflow.
* Added permission: {} in sync_github_issues_to_azdo workflow.
* Added content: read permissions to build, publish, check_docs and run_unit_tests workflows.
* Added persis-credentials: false to checkout action
---------
Signed-off-by: zoechanzy <zoe.chan@emerson.com>
9203d11 to
d26ff09
Compare
* Remove permissions: contents: read from build.yml, check_docs.yml, publish.yml and run_unit_tests.yml --------- Signed-off-by: zoechanzy <zoe.chan@emerson.com>
*This reverts commit 1e5cf35. --------- Signed-off-by: zoechanzy <zoe.chan@emerson.com>
8b92bab to
67eb5ba
Compare
tjying95
left a comment
There was a problem hiding this comment.
Good after address feedback and fix action failure for Python > 3.9.
* Added typing-extensions to pyproject.toml * Updated poetry.lock using poetry lock --------- Signed-off-by: zoechanzy <zoe.chan@emerson.com>
* Set min-release-age to 2 weeks in poetry.toml * Regenerate poetry.lock file after updating poetry version to 2.4.1 --------- Signed-off-by: zoechanzy <zoe.chan@emerson.com>
bkeryan
left a comment
There was a problem hiding this comment.
Approved with suggestions
* Use split Poetry markers so Python 3.10 stays on pytest 8 --------- Signed-off-by: zoechanzy <zoe.chan@emerson.com>
0f280a1 to
586ea76
Compare
What does this Pull Request accomplish?
Why should this Pull Request be merged?
Add unit tests and reporting result github workflows.
Related work item:
https://dev.azure.com/ni/DevCentral/_workitems/edit/3776265
Address #51