chore(deps): update Python dependencies #34
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] | |
| # Least-privilege default; jobs that need more permissions declare them explicitly. | |
| permissions: | |
| contents: read | |
| # Run JavaScript-based actions on Node 24 (GitHub runner opt-in; avoids deprecated Node 20 runtime). | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| test: | |
| name: Test (${{ matrix.os }}, Python ${{ matrix.python-version }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| # Full Python minor coverage on Linux; macOS/Windows one representative cell (see specs/active/ci-hygiene Q2). | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| python-version: "3.11" | |
| - os: ubuntu-latest | |
| python-version: "3.12" | |
| - os: ubuntu-latest | |
| python-version: "3.13" | |
| - os: macos-latest | |
| python-version: "3.13" | |
| - os: windows-latest | |
| python-version: "3.13" | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv sync --extra dev | |
| - name: Lint (ruff) | |
| run: uv run ruff check src/ tests/ | |
| - name: Format check (ruff) | |
| run: uv run ruff format --check src/ tests/ | |
| - name: Type check (mypy) | |
| run: uv run mypy src/buckler/ | |
| - name: Run tests | |
| shell: bash | |
| run: | | |
| set -o pipefail | |
| uv run pytest tests/ -v --tb=short 2>&1 | tee "${RUNNER_TEMP}/pytest-output.txt" | |
| - name: Coverage summary | |
| if: always() | |
| shell: bash | |
| run: | | |
| [[ -f "${RUNNER_TEMP}/pytest-output.txt" ]] || exit 0 | |
| { | |
| echo "## Coverage — Python ${{ matrix.python-version }} (${{ matrix.os }})" | |
| echo "" | |
| echo '```' | |
| awk '/^Name /{p=1} p' "${RUNNER_TEMP}/pytest-output.txt" | |
| echo '```' | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| node-runtime: | |
| name: Node ${{ matrix.node-version }} (smoke) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: ["22", "24"] | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Verify Node major | |
| run: node -e "const m=process.version.match(/^v(\\d+)/)[1]; if (m !== process.env.EXPECTED) { console.error('want v'+process.env.EXPECTED+'.*, got', process.version); process.exit(1); }" | |
| env: | |
| EXPECTED: ${{ matrix.node-version }} | |
| shellcheck: | |
| name: Shellcheck setup.sh | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| - name: Install shellcheck | |
| run: sudo apt-get install -y shellcheck | |
| - name: Check setup.sh syntax (bash -n) | |
| run: bash -n scripts/setup.sh | |
| - name: Shellcheck | |
| run: shellcheck --shell=bash --severity=warning scripts/setup.sh |