Skip to content

workflow: Add unit tests and reporting results workflows - #64

Merged
zoechanzy merged 11 commits into
mainfrom
users/zchan/nislsc_github_workflows
Aug 4, 2026
Merged

workflow: Add unit tests and reporting results workflows#64
zoechanzy merged 11 commits into
mainfrom
users/zchan/nislsc_github_workflows

Conversation

@zoechanzy

@zoechanzy zoechanzy commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

What does this Pull Request accomplish?

  • Update CI workflow to run unit tests and report results
  • Create run_unit_tests workflow
  • Create report_test_results workflow to report test results
  • Add check_workflows.yml
  • Update to poetry 2.4.1

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

@ni-github-admins

ni-github-admins commented Jul 21, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml reusable workflow to execute pytest (with coverage) and upload JUnit XML artifacts.
  • Added report_test_results.yml reusable workflow to download those artifacts and publish results via publish-unit-test-result-action.
  • Updated CI.yml to 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.

Comment thread .github/workflows/run_unit_tests.yml Outdated
Comment thread .github/workflows/run_unit_tests.yml Outdated
Comment thread .github/workflows/run_unit_tests.yml
Comment thread .github/workflows/CI.yml Outdated
@zoechanzy
zoechanzy force-pushed the users/zchan/nislsc_github_workflows branch 2 times, most recently from 3485d49 to 059cebc Compare July 21, 2026 05:58
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

Test Results

   14 files     14 suites   16m 3s ⏱️
  224 tests   224 ✅ 0 💤 0 ❌
3 136 runs  3 136 ✅ 0 💤 0 ❌

Results for commit 586ea76.

♻️ This comment has been updated with latest results.

Comment thread .github/workflows/run_unit_tests.yml Outdated
Comment thread .github/workflows/run_unit_tests.yml Outdated
Comment thread .github/workflows/run_unit_tests.yml
Comment thread .github/workflows/CI.yml

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()

Comment thread .github/workflows/run_unit_tests.yml
Comment thread .github/workflows/CI.yml Outdated
Comment thread .github/workflows/PR.yml Outdated
@zoechanzy
zoechanzy force-pushed the users/zchan/nislsc_github_workflows branch from 8717476 to d91112d Compare July 27, 2026 01:29
* 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>
@zoechanzy
zoechanzy force-pushed the users/zchan/nislsc_github_workflows branch 3 times, most recently from 6059bbf to 1ebc733 Compare July 27, 2026 04:53
* 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>
@zoechanzy
zoechanzy force-pushed the users/zchan/nislsc_github_workflows branch from 1ebc733 to ff769c2 Compare July 27, 2026 04:55
@zoechanzy
zoechanzy marked this pull request as ready for review July 28, 2026 00:24
Comment thread .github/workflows/CI.yml
* 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>
@zoechanzy
zoechanzy force-pushed the users/zchan/nislsc_github_workflows branch from 9203d11 to d26ff09 Compare July 30, 2026 05:19
* 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>
@zoechanzy
zoechanzy force-pushed the users/zchan/nislsc_github_workflows branch from 8b92bab to 67eb5ba Compare July 30, 2026 05:48

@tjying95 tjying95 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Comment thread .github/workflows/run_unit_tests.yml
Comment thread poetry.lock
* 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>
@zoechanzy
zoechanzy requested a review from bkeryan August 3, 2026 01:38

@bkeryan bkeryan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with suggestions

Comment thread pyproject.toml
* Use split Poetry markers so Python 3.10 stays on pytest 8

---------

Signed-off-by: zoechanzy <zoe.chan@emerson.com>
@zoechanzy
zoechanzy force-pushed the users/zchan/nislsc_github_workflows branch from 0f280a1 to 586ea76 Compare August 4, 2026 00:30
@zoechanzy
zoechanzy merged commit e977eda into main Aug 4, 2026
21 checks passed
@tjying95 tjying95 mentioned this pull request Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants