Portfolio polish #16
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| ci: | |
| name: Test, compile, and Docker checks | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| cache-dependency-path: requirements.txt | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -r requirements.txt | |
| - name: Run deterministic test suite | |
| run: python -m pytest | |
| - name: Python compilation check | |
| run: python -m compileall src tests scripts -q | |
| - name: Tracked-file hygiene check | |
| run: | | |
| bad=$(git ls-files | grep -E '(^|/)(\.(env|venv)|__pycache__|\.pytest_cache|\.DS_Store)($|/)' || true) | |
| if [ -n "$bad" ]; then | |
| echo "ERROR: tracked local artifacts found:" | |
| echo "$bad" | |
| exit 1 | |
| fi | |
| echo "No tracked local artifacts found." | |
| - name: Build Docker image | |
| run: docker build -t bug-triage-workflow . | |
| - name: Docker CLI smoke test (--help, no API key) | |
| run: docker run --rm bug-triage-workflow --help | |
| - name: Docker non-root check | |
| run: | | |
| docker run --rm --entrypoint id bug-triage-workflow | tee /tmp/container-id.txt | |
| ! grep -q 'uid=0(root)' /tmp/container-id.txt |