deps: bump clap from 4.6.0 to 4.6.1 #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] | |
| paths-ignore: ['**.md', 'docs/**', 'LICENSE', '.gitignore'] | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: ['**.md', 'docs/**'] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-ci | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| check: | |
| name: clippy + fmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Clippy | |
| run: cargo clippy -- -W clippy::all | |
| - name: Format check | |
| run: cargo fmt -- --check | |
| test: | |
| name: test (${{ matrix.target }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| cross: true | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.target }} | |
| - name: Install cross | |
| if: matrix.cross | |
| run: cargo install cross --git https://github.com/cross-rs/cross | |
| - name: Test (native) | |
| if: ${{ !matrix.cross }} | |
| run: cargo test --target ${{ matrix.target }} | |
| - name: Test (cross) | |
| if: matrix.cross | |
| # Only run unit tests under QEMU — integration tests need real PTY | |
| # timing that doesn't work under emulation. | |
| run: cross test --target ${{ matrix.target }} --bin hm | |
| - name: Build release | |
| if: ${{ !matrix.cross }} | |
| run: cargo build --release --target ${{ matrix.target }} | |
| - name: Build release (cross) | |
| if: matrix.cross | |
| run: cross build --release --target ${{ matrix.target }} | |
| coverage: | |
| name: coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: llvm-tools-preview | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Generate coverage | |
| run: | | |
| source <(cargo llvm-cov show-env --sh) | |
| cargo llvm-cov clean --workspace | |
| cargo build | |
| cargo test | |
| HM_BIN="$PWD/target/debug/hm" uv run pytest tests/ -v | |
| cargo llvm-cov report --lcov --output-path lcov.info | |
| - name: Upload to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: lcov.info | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false |