Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
ci: generalise composite action and use it from test matrix (#2486)
Maximilian Roosa1de9c7d0baf
diff --git a/.github/actions/affected-setup/action.yaml b/.github/actions/test-setup/action.yamlsimilarity index 54%rename from .github/actions/affected-setup/action.yamlrename to .github/actions/test-setup/action.yamlindex 18e1c23c6..a6259552e 100644--- a/.github/actions/affected-setup/action.yaml+++ b/.github/actions/test-setup/action.yaml@@ -1,5 +1,8 @@-name: cargo-affected setup-description: Tools and caches shared by collect-affected and affected-tests+name: test setup+description: |+ Cargo test tooling, rust-cache, and the shells our PTY tests exercise.+ Used by the test matrix and the cargo-affected jobs (which add their own+ cargo-affected + llvm-tools steps after this).runs:using: composite@@ -16,27 +19,25 @@ runs:crate: cargo-nextestversion: "=0.9.132"- - name: Install cargo-affected- uses: baptiste0928/cargo-install@v3- with:- crate: cargo-affected- git: https://github.com/max-sixty/cargo-affected- # No rev/branch/tag β action resolves to latest default-branch sha.-- - name: Install llvm-tools- shell: bash- run: rustup component add llvm-tools-- name: π° Cacheuses: Swatinem/rust-cache@v2- - name: Install shells (zsh, fish)+ - name: Install shells (zsh, fish) - Ubuntu+ if: runner.os == 'Linux'uses: awalsh128/cache-apt-pkgs-action@latestwith:packages: zsh fishversion: 1.0+ - name: Install shells (fish) - macOS+ if: runner.os == 'macOS'+ shell: bash+ run: |+ brew install fish+ # bash and zsh are pre-installed on macOS+- name: Install nushell+ if: runner.os != 'Windows'uses: hustcer/setup-nu@v3with:version: '0.112.2'diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yamlindex 3a6bc34ed..21c3a8b71 100644--- a/.github/workflows/ci.yaml+++ b/.github/workflows/ci.yaml@@ -85,48 +85,7 @@ jobs:- name: π Checkout codeuses: actions/checkout@v6- - name: Install cargo-insta- uses: baptiste0928/cargo-install@v3- with:- crate: cargo-insta- version: "=1.46.3"-- - name: Install cargo-nextest- uses: baptiste0928/cargo-install@v3- with:- crate: cargo-nextest- version: "=0.9.132"-- - name: π° Cache- uses: Swatinem/rust-cache@v2-- - name: Install shells (zsh, fish) - Ubuntu- if: runner.os == 'Linux'- uses: awalsh128/cache-apt-pkgs-action@latest- with:- packages: zsh fish- version: 1.0-- - name: Install shells (fish) - macOS- if: runner.os == 'macOS'- run: |- brew install fish- # bash and zsh are pre-installed on macOS-- - name: Install nushell- if: runner.os != 'Windows'- uses: hustcer/setup-nu@v3- with:- version: '0.112.2'-- - name: Install shells - Windows- if: runner.os == 'Windows'- run: |- # Git Bash is pre-installed on GitHub Actions Windows runners- # Fish, zsh, and nushell are not commonly available on native Windows (require WSL/MSYS2)- # CI will test with bash only on Windows (tests skip unavailable shells)- echo "Using Git Bash for Windows tests"- shell: pwsh+ - uses: ./.github/actions/test-setup- name: Install wtuses: baptiste0928/cargo-install@v3@@ -315,7 +274,17 @@ jobs:# HEAD when collect ran. That sha must be reachable.fetch-depth: 0- - uses: ./.github/actions/affected-setup+ - uses: ./.github/actions/test-setup++ - name: Install cargo-affected+ uses: baptiste0928/cargo-install@v3+ with:+ crate: cargo-affected+ git: https://github.com/max-sixty/cargo-affected+ # No rev/branch/tag β action resolves to latest default-branch sha.++ - name: Install llvm-tools+ run: rustup component add llvm-tools- name: π Collect coverage dataenv:@@ -366,7 +335,14 @@ jobs:restore-keys: |cargo-affected-db-v1-${{ runner.os }}-- - uses: ./.github/actions/affected-setup+ - uses: ./.github/actions/test-setup++ - name: Install cargo-affected+ uses: baptiste0928/cargo-install@v3+ with:+ crate: cargo-affected+ git: https://github.com/max-sixty/cargo-affected+ # No rev/branch/tag β action resolves to latest default-branch sha.- name: π― Run affected testsenv: