Skip to content

chore(ci): remove duplicate test runs - #11007

Merged
RC-CHN merged 2 commits into
AstrBotDevs:masterfrom
RC-CHN:chore/ci-test-dedupe
Nov 5, 2026
Merged

RC-CHN merged 2 commits into
AstrBotDevs:masterfrom
RC-CHN:chore/ci-test-dedupe

Conversation

@RC-CHN

@RC-CHN RC-CHN commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Run the Linux full suite once: coverage now comes from the Ubuntu lane in unit_tests.yml, and coverage_test.yml is removed.
  • Keep the Windows and macOS lanes unchanged; coverage upload is limited to Linux and the upstream repository.
  • Stop running tests/test_install_script.py twice: the install workflow keeps the bash syntax check, while the behavioral tests run in the full pytest suite.

Verification

  • Both modified workflows parse as YAML.
  • bash -n scripts/run_pytests_ci.sh and bash -n docs/public/install.sh pass.
  • run_pytests_ci.sh ./tests/test_install_script.py --cov=astrbot --cov-report=xml passes: 17 tests.

Notes

CI-only change. pr_test_env.sh fixes are tracked separately.

Summary by Sourcery

Remove duplicate CI test runs by consolidating coverage and install-script behavioral testing into the primary unit-test workflow.

Enhancements:

  • Consolidate Linux full-suite coverage into the main unit-test workflow while preserving the existing Windows and macOS test lanes.
  • Avoid duplicate install-script testing by limiting the install workflow to syntax validation and running behavioral coverage in the full test suite.

CI:

  • Remove the dedicated coverage workflow and restrict coverage uploads to Linux runs in the upstream repository.

Move coverage collection into the Ubuntu lane and remove the separate coverage workflow so the full suite runs once per change.
Keep the bash syntax check in the install workflow; behavioral coverage comes from the full pytest suite, which already collects the file.

@sourcery-ai sourcery-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.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path=".github/workflows/install_script_test.yml" line_range="50" />
<code_context>
         uses: actions/checkout@v7

-      - name: Test Bash installer
+      - name: Check Bash installer syntax
         shell: bash
-        run: |
</code_context>
<issue_to_address>
**Manual run skips installer behavior tests**

When a maintainer manually dispatches the install-script workflow to validate Bash installer behavior, the workflow runs only PowerShell tests and a Bash syntax check; it no longer runs `tests/test_install_script.py`. Dispatching this workflow does not dispatch `unit_tests.yml`, so it can pass without exercising Bash installer behavior.

Run the behavioral test on manual dispatch, or make the install workflow dispatch the unit-test workflow.
</issue_to_address>

Sourcery assessment

Needs a human reviewer. 1 finding to address first, and the unit-test process now receives OPENAI_API_KEY, so test code can use or send that credential; any use or exposure during a run is not undone by reverting the workflow. Granting tests access to the key changes the CI trust boundary, and a leak may not produce a failing check.

Blocking findings: .github/workflows/install_script_test.yml:50


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

uses: actions/checkout@v7

- name: Test Bash installer
- name: Check Bash installer syntax

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.

🟡 Medium · Manual run skips installer behavior tests

When a maintainer manually dispatches the install-script workflow to validate Bash installer behavior, the workflow runs only PowerShell tests and a Bash syntax check; it no longer runs tests/test_install_script.py. Dispatching this workflow does not dispatch unit_tests.yml, so it can pass without exercising Bash installer behavior.

Run the behavioral test on manual dispatch, or make the install workflow dispatch the unit-test workflow.

Prompt for AI agents
In `.github/workflows/install_script_test.yml` at line 50:

**Manual run skips installer behavior tests**

When a maintainer manually dispatches the install-script workflow to validate Bash installer behavior, the workflow runs only PowerShell tests and a Bash syntax check; it no longer runs `tests/test_install_script.py`. Dispatching this workflow does not dispatch `unit_tests.yml`, so it can pass without exercising Bash installer behavior.

Run the behavioral test on manual dispatch, or make the install workflow dispatch the unit-test workflow.

@codecov-commenter

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

@RC-CHN
RC-CHN merged commit 9503772 into AstrBotDevs:master Nov 5, 2026
28 checks passed
@RC-CHN
RC-CHN deleted the chore/ci-test-dedupe branch November 5, 2026 09:15
@Soulter Soulter moved this to Done in AstrBot Roadmap Nov 5, 2026
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.

2 participants