chore(deps): Update github-actions #222
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: Tools | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| CARGO_INCREMENTAL: "0" | |
| CARGO_NET_RETRY: "10" | |
| jobs: | |
| tools: | |
| name: Tools (telepath CLI clippy + tests) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Detect relevant changes | |
| id: guard | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
| BASE="${{ github.event.pull_request.base.sha }}" | |
| HEAD="${{ github.event.pull_request.head.sha }}" | |
| else | |
| BASE="${{ github.event.before }}" | |
| HEAD="${{ github.sha }}" | |
| fi | |
| if [[ -z "$BASE" || "$BASE" == "0000000000000000000000000000000000000000" ]]; then | |
| echo "run=true" >> "$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| git fetch origin "$BASE" --depth=1 2>/dev/null || true | |
| MERGE_BASE="$(git merge-base "$BASE" "$HEAD" 2>/dev/null || echo '')" | |
| if [[ -z "$MERGE_BASE" ]]; then | |
| echo "::warning::merge-base unavailable; defaulting to run." | |
| echo "run=true" >> "$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| CHANGED="$(git diff --name-only "$MERGE_BASE" "$HEAD" 2>/dev/null || echo '')" | |
| if [[ -z "$CHANGED" ]]; then | |
| echo "run=true" >> "$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| # tools/telepath + upstream deps (wire, client, macros) + root manifests. | |
| # Root Cargo.lock included: workspace dep resolution changes can affect CLI builds. | |
| PATTERNS='^(telepath-(wire|client|macros)/|tools/telepath/|Cargo\.(toml|lock)$|Justfile$|rust-toolchain\.toml$|\.github/(workflows/tools\.yml|actions/rust-setup/))' | |
| if echo "$CHANGED" | grep -qE "$PATTERNS"; then | |
| echo "run=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "run=false" >> "$GITHUB_OUTPUT" | |
| echo "::notice::No tools-relevant changes; skipping." | |
| fi | |
| - name: Setup Rust environment | |
| if: steps.guard.outputs.run == 'true' | |
| uses: ./.github/actions/rust-setup | |
| with: | |
| components: clippy | |
| cache-key: tools-telepath | |
| cache-workspaces: tools/telepath | |
| install-libudev: 'true' | |
| - name: Clippy (tools/telepath — all feature combos) | |
| if: steps.guard.outputs.run == 'true' | |
| run: just clippy-tools | |
| - name: Test telepath tool (default + mcp,serial) | |
| if: steps.guard.outputs.run == 'true' | |
| run: just mcp-test |