Repository navigation
docs(pr-review): record untrusted prompt fencing #2291
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| # NOTE: pull_request (not pull_request_target) so checks run against the PR head. | |
| on: | |
| pull_request: | |
| branches: ["*"] | |
| push: | |
| branches: ["main", "master"] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0 | |
| with: | |
| enable-cache: true | |
| python-version: "3.12" | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: "24" | |
| - name: Run tests | |
| run: uv run --group test pytest tests/ | |
| env: | |
| PYTHONPATH: ${{ github.workspace }} | |
| # Plugins under plugins/<name>/tests are self-contained (stdlib-only unit | |
| # tests that import the plugin's own scripts via importlib). Run them in | |
| # a separate step so a plugin failure is attributed to the plugin, not | |
| # the root suite. shopt -s nullglob leaves the array empty when no | |
| # plugin ships tests, so this step is a no-op in that case. | |
| # | |
| # PYTHONDONTWRITEBYTECODE=1 keeps __pycache__/*.pyc from being written | |
| # next to the plugin's scripts/ directory, which would otherwise leak | |
| # into the agent-visible SkillResources manifest the next time the | |
| # plugin is loaded via openhands.sdk.skills. See | |
| # scripts/check_plugin_resources.py for the matching CI guard. | |
| - name: Run plugin tests | |
| shell: bash | |
| env: | |
| PYTHONDONTWRITEBYTECODE: "1" | |
| run: | | |
| shopt -s nullglob | |
| plugin_tests=(plugins/*/tests) | |
| if [ ${#plugin_tests[@]} -eq 0 ]; then | |
| echo "No plugin tests found; skipping." | |
| exit 0 | |
| fi | |
| echo "Discovered plugin test dirs:" | |
| printf ' %s\n' "${plugin_tests[@]}" | |
| uv run --group test pytest "${plugin_tests[@]}" |