Skip to content

ci: run unit tests on PRs and fix two stale prompt assertions - #140

Open
alanhc wants to merge 2 commits into
XS-MLVP:mainfrom
alanhc:test/ci-and-stale-prompt-asserts
Open

alanhc wants to merge 2 commits into
XS-MLVP:mainfrom
alanhc:test/ci-and-stale-prompt-asserts

Conversation

@alanhc

@alanhc alanhc commented Oct 9, 2026

Copy link
Copy Markdown

Summary

None of the existing workflows run the test suite, and main currently has two failing tests in tests/test_waveform_prompt_config.py. Both come from intentional wording changes whose assertions were not updated:

  • 95744ca changed the batch_advanced note in the default system prompt from 不是Checker失败 to 不是验证失败.
  • df611a1 renamed "failed checkpoint" to "unhit checkpoint" in the dynamic Bug document help text.

This PR updates those assertions and adds a Tests workflow so this kind of drift is caught on the PR that introduces it.

Changes

  • Code

  • Documentation

  • Tests

  • Examples / Tooling

  • tests/test_waveform_prompt_config.py: three assertions now match the current wording. No runtime behavior changes.

  • .github/workflows/test.yml: new workflow on push to main, pull requests to main, and manual dispatch.

    • pytest on Python 3.11 (the requires-python minimum) and 3.12, installed with pip install -e ..
    • node --test tests/*.js for the web UI tests, which only use Node.js built-in modules.
    • tests/test_mcps.py is excluded. It is a manual script that needs a live MCP server on localhost:5000 and the fastmcp package, which is not a project dependency.

Open question: the plugin test suites under plugins/*/tests are not run, since each plugin has its own dependencies. Happy to add them as separate jobs if you want.

Testing

pip install -e . pytest
python -m pytest tests --ignore=tests/test_mcps.py -q
# Python 3.11: 1200 passed
node --test tests/*.js
# 4 passed

The same workflow ran green on my fork: https://github.com/alanhc/UCAgent/actions/runs/37881442905 (1200 passed on 3.11 and 3.12, 4 Node tests passed)

Checklist

  • I read and followed CONTRIBUTING.md.
  • I ran all relevant tests and they pass locally.
  • I updated documentation/examples if behavior changed.
  • I agree that this contribution will be released under the project's open-source license (see LICENSE).
  • I agree to follow the repository's Code of Conduct.

alanhc added 2 commits October 9, 2026 11:54
Two prompt/help-text rewrites landed without updating
tests/test_waveform_prompt_config.py, so two tests fail on main:

- 95744ca changed the batch_advanced note in the default system prompt
  from "不是Checker失败" to "不是验证失败".
- df611a1 renamed "failed checkpoint" to "unhit checkpoint" in the
  dynamic Bug document help text.

Update the three stale assertions to the current wording. No runtime
behavior changes.
None of the existing workflows run the test suite, which is how the
stale assertions fixed in the previous commit reached main unnoticed.

Add a Tests workflow with two jobs:

- pytest on Python 3.11 (the minimum in pyproject.toml) and 3.12,
  installing the package with "pip install -e ." exactly as users do.
- node --test for the web UI tests under tests/*.js, which only use
  Node.js built-in modules.

tests/test_mcps.py is excluded: it is a manual script that needs a live
MCP server on localhost:5000 and the fastmcp package, which is not a
project dependency.

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.

1 participant