Repository navigation
chore(ci): remove duplicate test runs - #11007
Conversation
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.
There was a problem hiding this comment.
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
| uses: actions/checkout@v7 | ||
|
|
||
| - name: Test Bash installer | ||
| - name: Check Bash installer syntax |
There was a problem hiding this comment.
🟡 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.
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 ☂️ |
Summary
unit_tests.yml, andcoverage_test.ymlis removed.tests/test_install_script.pytwice: the install workflow keeps the bash syntax check, while the behavioral tests run in the full pytest suite.Verification
bash -n scripts/run_pytests_ci.shandbash -n docs/public/install.shpass.run_pytests_ci.sh ./tests/test_install_script.py --cov=astrbot --cov-report=xmlpasses: 17 tests.Notes
CI-only change.
pr_test_env.shfixes 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:
CI: