Skip to content

CI: run npm run test on pull requests in existing workflow - #2697

Merged
UnschooledGamer merged 5 commits into
mainfrom
copilot/acode-2695-run-unit-tests
Aug 8, 2026
Merged

CI: run npm run test on pull requests in existing workflow#2697
UnschooledGamer merged 5 commits into
mainfrom
copilot/acode-2695-run-unit-tests

Conversation

Copilot AI commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

This updates the existing CI workflow to execute the unit test suite for new pull requests. The workflow now explicitly covers npm run test as requested.

  • What changed

    • Added a new unit-tests job in .github/workflows/ci.yml.
    • Scoped the job to PR events only:
      • if: github.event_name == 'pull_request'
    • Configured the job to:
      • checkout the repo
      • setup Node with npm cache
      • install dependencies via npm ci --no-audit --no-fund
      • run tests via npm run test
  • Security hardening in workflow

    • Set explicit least-privilege token permissions for the new job:
      • permissions: contents: read
  • Job shape

    unit-tests:
      name: Unit Tests (On PR Only)
      runs-on: ubuntu-latest
      permissions:
        contents: read
      if: github.event_name == 'pull_request'
      steps:
        - uses: actions/checkout@v7
        - uses: actions/setup-node@v7
        - run: npm ci --no-audit --no-fund
        - run: npm run test

Copilot AI and others added 2 commits August 8, 2026 06:23
Co-authored-by: UnschooledGamer <76094069+UnschooledGamer@users.noreply.github.com>
Co-authored-by: UnschooledGamer <76094069+UnschooledGamer@users.noreply.github.com>
Copilot AI changed the title [WIP] Add unit tests execution for new pull requests CI: run npm run test on pull requests in existing workflow Aug 8, 2026
Copilot AI requested a review from UnschooledGamer August 8, 2026 06:25
Restrict CI workflow to run on pushes to the main branch.
@UnschooledGamer
UnschooledGamer marked this pull request as ready for review August 8, 2026 07:07
@greptile-apps

greptile-apps Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a pull-request-only unit-test job to the existing CI workflow and hardens workflow dependencies by pinning the relevant actions to commit SHAs.

  • Runs npm ci --no-audit --no-fund and npm run test for pull requests.
  • Grants the unit-test job read-only repository access.
  • Pins checkout, setup-node, and setup-biome action references.
  • Limits push-triggered workflow runs to main.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
.github/workflows/ci.yml Adds the PR unit-test job and pins the action references, fully resolving the previously reported mutable-version concern.

Reviews (2): Last reviewed commit: "Update ci.yml" | Re-trigger Greptile

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml Outdated
@UnschooledGamer

Copy link
Copy Markdown
Collaborator

@greptile review again.

@UnschooledGamer
UnschooledGamer added this pull request to the merge queue Aug 8, 2026
Merged via the queue into main with commit b07c857 Aug 8, 2026
11 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in The Code Board - Acode Aug 8, 2026
@UnschooledGamer
UnschooledGamer deleted the copilot/acode-2695-run-unit-tests branch August 8, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Run unit tests on new pull requests

2 participants