cli fixes #213
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: CLI Tests | |
| on: | |
| pull_request: | |
| branches: [main, dev] | |
| paths: | |
| - 'helix-cli/**' | |
| - 'metrics/**' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - '.github/workflows/cli_tests.yml' | |
| push: | |
| branches: [main, dev] | |
| paths: | |
| - 'helix-cli/**' | |
| - 'metrics/**' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - '.github/workflows/cli_tests.yml' | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| HELIX_NO_UPDATE_CHECK: "1" | |
| HELIX_DISABLE_UPDATE_CHECK: "1" | |
| NO_COLOR: "1" | |
| jobs: | |
| test: | |
| name: CLI Tests (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Cache cargo dependencies | |
| uses: actions/cache@v4 | |
| continue-on-error: true | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') || 'fallback' }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Validate workspace metadata | |
| run: cargo metadata --no-deps --format-version 1 | |
| - name: Check formatting | |
| run: cargo fmt --check | |
| - name: Check helix-cli | |
| run: cargo check -p helix-cli | |
| - name: Test helix-cli | |
| run: cargo test -p helix-cli | |
| - name: Clippy helix-cli | |
| run: cargo clippy -p helix-cli -- -D warnings | |
| runtime-e2e: | |
| name: CLI Runtime E2E | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo dependencies | |
| uses: actions/cache@v4 | |
| continue-on-error: true | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-runtime-e2e-${{ hashFiles('**/Cargo.lock') || 'fallback' }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Verify Docker daemon | |
| run: docker info | |
| - name: Run Docker-backed CLI e2e | |
| env: | |
| HELIX_E2E_KEEP_TMP: "1" | |
| run: cargo test -p helix-cli --test e2e_runtime -- --ignored --nocapture | |
| - name: Upload runtime e2e artifacts on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cli-runtime-e2e-artifacts | |
| path: /tmp/helix-cli-e2e-* | |
| if-no-files-found: ignore |