Skip to content

Add pull-request test workflow with least-privilege token permissions - #41

Merged
swainn merged 10 commits into
masterfrom
copilot/add-github-workflow-for-tests
Aug 18, 2026
Merged

Add pull-request test workflow with least-privilege token permissions#41
swainn merged 10 commits into
masterfrom
copilot/add-github-workflow-for-tests

Conversation

Copilot AI commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

This PR adds GitHub Actions coverage for pull requests by introducing a dedicated test workflow. It runs the repository’s CI-safe unittest modules on every PR and hardens workflow security with explicit minimal token permissions.

  • New PR test workflow

    • Added .github/workflows/tests.yml triggered on pull_request.
    • Defines a single test job on ubuntu-latest with Python setup and editable install.
  • Test execution scope

    • Runs targeted unittest modules that are stable in standard GitHub-hosted runners:
      • tests.test_job
      • tests.test_node
      • tests.test_templates
      • tests.test_workflow
      • tests.test_remote_reuse
  • Runtime environment prep

    • Adds SSH key/bootstrap step required by the remote-related test paths in the selected suite.
  • Workflow security posture

    • Sets explicit job-level permissions:
      • contents: read
on:
  pull_request:

jobs:
  test:
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
      - run: python -m pip install -e .
      - run: python -m unittest tests.test_job tests.test_node tests.test_templates tests.test_workflow tests.test_remote_reuse

Copilot AI and others added 2 commits August 13, 2026 20:54
Co-authored-by: swainn <5123221+swainn@users.noreply.github.com>
Co-authored-by: swainn <5123221+swainn@users.noreply.github.com>
@swainn
swainn marked this pull request as ready for review August 13, 2026 21:02
Copilot AI lite review requested due to automatic review settings August 13, 2026 21:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 a dedicated GitHub Actions workflow to run a CI-safe subset of the project’s unittest suite on every pull request, while explicitly constraining the workflow token permissions to least privilege.

Changes:

  • Added a new pull_request-triggered workflow that sets up Python and runs selected unittest modules.
  • Added a bootstrap step intended to support remote/SSH-related test paths.
  • Hardened workflow security by explicitly setting contents: read token permissions at the job level.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/tests.yml Outdated
Copilot AI and others added 3 commits August 13, 2026 21:13
Co-authored-by: swainn <5123221+swainn@users.noreply.github.com>
Co-authored-by: swainn <5123221+swainn@users.noreply.github.com>
Co-authored-by: swainn <5123221+swainn@users.noreply.github.com>
Co-authored-by: swainn <5123221+swainn@users.noreply.github.com>
Co-authored-by: swainn <5123221+swainn@users.noreply.github.com>
Co-authored-by: swainn <5123221+swainn@users.noreply.github.com>
Co-authored-by: swainn <5123221+swainn@users.noreply.github.com>
@swainn
swainn merged commit 680ff6c into master Aug 18, 2026
2 checks passed
@swainn
swainn deleted the copilot/add-github-workflow-for-tests branch August 18, 2026 12:10
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.

3 participants