refactor(derive): remove clap compatibility spellings #5564
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: coverage | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: {} | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| coverage: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: jdx/mise-action@7e36c90d9ab29c415a2384db3006f3ec8a8cc654 # v4.2.4 | |
| - run: rustup update stable | |
| - run: rustup component add llvm-tools-preview --toolchain stable-x86_64-unknown-linux-gnu | |
| - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@4c7e9f3bb4ca35f54341be8fc8d3608f71e4d24e # zizmor: ignore[impostor-commit] cargo-llvm-cov (tag-only ref by design) | |
| # See the note in test.yml: the shell tests refuse to skip under CI, so this fixes | |
| # the flaky mirror rather than the consequence of it. | |
| - name: Install shells for completion integration tests | |
| timeout-minutes: 5 | |
| run: | | |
| sudo sed -i 's|http://azure.archive.ubuntu.com/ubuntu|https://archive.ubuntu.com/ubuntu|g' /etc/apt/apt-mirrors.txt | |
| sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=15 -o Acquire::https::Timeout=15 update | |
| sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=15 -o Acquire::https::Timeout=15 install -y zsh fish | |
| if ! command -v pwsh >/dev/null 2>&1; then | |
| sudo snap install powershell --classic | |
| fi | |
| - name: Report which shells are available | |
| if: always() | |
| run: | | |
| probe_dir=$(mktemp -d) | |
| trap 'rm -rf "$probe_dir"' EXIT | |
| for shell in bash zsh fish pwsh; do | |
| if [[ "$shell" == pwsh ]]; then | |
| probe="$probe_dir/$shell.ps1" | |
| else | |
| probe="$probe_dir/$shell" | |
| fi | |
| printf 'echo ok\n' > "$probe" | |
| if [[ "$shell" == pwsh ]]; then | |
| output=$(pwsh -NoProfile -NonInteractive -File "$probe" 2>/dev/null) && usable=true || usable=false | |
| else | |
| output=$("$shell" "$probe" 2>/dev/null) && usable=true || usable=false | |
| fi | |
| if [[ "$usable" == true && "$output" == ok ]]; then | |
| echo "$shell: $(command -v "$shell") (script probe passed)" | |
| else | |
| echo "::warning::$shell cannot run a script, so its completion tests cannot run" | |
| fi | |
| done | |
| - name: Generate code coverage | |
| run: mise run coverage |