Skip to content

Run all script unit tests on every PR, not just the clusters tests - #1226

Open
LukasWallrich wants to merge 1 commit into
mainfrom
script-tests-in-ci
Open

LukasWallrich wants to merge 1 commit into
mainfrom
script-tests-in-ci

Conversation

@LukasWallrich

@LukasWallrich LukasWallrich commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Only the clusters tests ran in CI, so a PR could break the tests for the SEO checks, the data and staging scripts or the disciplines parser without anyone noticing (#1223).

The clusters workflow becomes script-tests.yaml. On every PR it runs everything in scripts/tests/ plus scripts/test_parse_disciplines_gdoc.py. The tests take about 4 seconds (49 on main, 179 on rebrand-doors), and installing pandas, python-docx and playwright takes most of the job's time. Playwright is only imported by the Doors preview checks; no browsers are installed.

Every PR rather than a path filter, because the tests also read data, content and workflow files. Checked locally in a clean virtual environment with only those three packages: both suites pass on main and on #1222's branch.

Closes #1223.

Created with Claude Opus 5.5 in Claude Code (T3 Code).


Summary by cubic

Runs all script unit tests on every PR so the SEO checks, data and staging scripts, and the disciplines parser can't break unnoticed. Only the clusters tests ran in CI before.

Notes

  • The clusters workflow becomes script-tests.yaml, adding the disciplines parser test and the tests in scripts/tests/.
  • Every PR triggers it rather than a path filter because the tests read data, content, and workflow files.
  • The tests take a few seconds; installing pandas, python-docx, and playwright takes most of the job time. Playwright is only imported, no browsers are installed.
  • Closes SEO and most script unit tests never run in CI #1223.

Written for commit 8be8af9. Summary will update on new commits.

View guided diff Turn on auto-fix

Only the clusters tests ran in CI, so the SEO, data and staging script tests
could break unnoticed (#1223). The clusters workflow becomes script-tests.yaml
and runs everything in scripts/tests/ plus the disciplines parser test, which
take a few seconds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LukasWallrich
LukasWallrich requested a review from a team as a code owner November 19, 2026 16:26
@github-actions

Copy link
Copy Markdown
Contributor

👍 All image files/references (if any) are in webp format, in line with our policy.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Spell Check Passed

No spelling issues found when checking 3 changed file(s)! 🎉

@LukasWallrich

LukasWallrich commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Staging Deployment Status

This PR has been successfully deployed to staging as part of an aggregated deployment.

Deployed at: 2026-12-03 13:33:21 UTC
Staging URL: https://staging.forrt.org

The staging site shows the combined state of all compatible open PRs.

@cubic-dev-ai cubic-dev-ai Bot 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.

1 issue found across 4 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/script-tests.yaml">

<violation number="1" location=".github/workflows/script-tests.yaml:33">
P3: Neither test suite imports Playwright, so installing it adds CI time and an unnecessary dependency without covering any check. Remove `playwright` from this install command unless a Playwright-based test is added.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

# pandas: resource.py; python-docx: the disciplines parser;
# playwright (imported only, no browsers): the Doors preview checks.
- name: Install test dependencies
run: python3 -m pip install pandas python-docx playwright

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.

P3: Neither test suite imports Playwright, so installing it adds CI time and an unnecessary dependency without covering any check. Remove playwright from this install command unless a Playwright-based test is added.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .github/workflows/script-tests.yaml, line 33:

<comment>Neither test suite imports Playwright, so installing it adds CI time and an unnecessary dependency without covering any check. Remove `playwright` from this install command unless a Playwright-based test is added.</comment>

<file context>
@@ -0,0 +1,39 @@
+      # pandas: resource.py; python-docx: the disciplines parser;
+      # playwright (imported only, no browsers): the Doors preview checks.
+      - name: Install test dependencies
+        run: python3 -m pip install pandas python-docx playwright
+
+      - name: Run tests in scripts/tests
</file context>
Suggested change
run: python3 -m pip install pandas python-docx playwright
run: python3 -m pip install pandas python-docx

LukasWallrich added a commit that referenced this pull request Nov 20, 2026
Use the same workflow as #1226 so reviews of rebrand-doors exercise the SEO checks, data and staging scripts, and parsers.

Co-authored-by: GPT-6.2 Sol <noreply@openai.com>

This branch has not been deployed

No deployments
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.

SEO and most script unit tests never run in CI

1 participant