Skip to content

Run tests on PR to main#4

Merged
jsoningram merged 4 commits intomainfrom
jingram/run-tests-on-pr
Apr 10, 2026
Merged

Run tests on PR to main#4
jsoningram merged 4 commits intomainfrom
jingram/run-tests-on-pr

Conversation

@jsoningram
Copy link
Copy Markdown
Collaborator

@jsoningram jsoningram commented Mar 9, 2026

Adds running tests when a PR is opened or updated


Note

Medium Risk
Changes GitHub Actions pipelines by introducing a shared test job and making deploy builds depend on it, which can block PR merges or deployments if the workflow or environment assumptions are wrong.

Overview
Adds a reusable GitHub Actions workflow (test.yml) that installs dependencies, installs Playwright Chromium, and runs npm test.

Introduces a new PR-triggered CI workflow (ci.yml) and updates deploy.yml to run the shared tests first (and require them via needs), while also aligning Node setup to .nvmrc during deploy builds.

Reviewed by Cursor Bugbot for commit fd8667a. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Autofix Details

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Manual deploys now skip tests entirely
    • I restored Playwright browser installation and test execution in the deploy workflow so manual and push-triggered deploys are gated by tests again.

Create PR

Or push these changes by commenting:

@cursor push 35556ec29f
Preview (35556ec29f)
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -67,6 +67,12 @@
       - name: Install dependencies
         run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
 
+      - name: Install Playwright Browsers
+        run: ${{ steps.detect-package-manager.outputs.runner }} playwright install --with-deps chromium
+
+      - name: Run tests
+        run: ${{ steps.detect-package-manager.outputs.manager }} test
+
       - name: Build with Next.js
         run: ${{ steps.detect-package-manager.outputs.runner }} next build
         env:

Comment thread .github/workflows/deploy.yml
@jsoningram jsoningram force-pushed the jingram/run-tests-on-pr branch from 36975ae to 4bf1260 Compare April 10, 2026 18:22
@jsoningram jsoningram changed the title Run tests on PR to main, not merge Run tests on PR to main Apr 10, 2026
Comment thread .github/workflows/ci.yml Outdated
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f0c4b21. Configure here.

Comment thread .github/workflows/ci.yml Outdated
@jsoningram jsoningram merged commit 310f11f into main Apr 10, 2026
2 checks passed
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.

1 participant