Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

Refactor CI workflow to separate linting into dedicated job

Maximilian Roosc8190c9ba346
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index e4da2910d..43ef0c7e9 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -13,6 +13,18 @@ env:
RUSTDOCFLAGS: "-Dwarnings"
jobs:
+ lint:
+ runs-on: ubuntu-latest
+ steps:
+ - name: πŸ“‚ Checkout code
+ uses: actions/checkout@v6
+
+ - name: πŸ’° Cache
+ uses: Swatinem/rust-cache@v2
+
+ - name: πŸ” Pre-commit hooks
+ uses: pre-commit/[email protected]
+
test:
strategy:
fail-fast: false
@@ -36,9 +48,6 @@ jobs:
- name: πŸ’° Cache
uses: Swatinem/rust-cache@v2
- with:
- prefix-key: v0-rust
- save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Install shells (bash, zsh, fish) - Ubuntu
if: runner.os == 'Linux'
@@ -61,19 +70,6 @@ jobs:
echo "Using Git Bash for Windows tests"
shell: pwsh
- - name: Setup Python for pre-commit
- uses: actions/setup-python@v5
- with:
- python-version: '3.12'
-
- - name: πŸ” Pre-commit hooks
- run: |
- pip install pre-commit
- pre-commit run --all-files
- env:
- # Skip lychee on Windows/macOS - it requires bash and we only need to run it once
- SKIP: ${{ runner.os != 'Linux' && 'lychee' || '' }}
-
# On Linux/macOS: Install from crates.io (pre-merge hooks run against published version)
# On Windows: Build from source (published version may not have Git Bash detection fixes)
- name: Install wt (Linux/macOS)
@@ -119,9 +115,6 @@ jobs:
- name: πŸ’° Cache
uses: Swatinem/rust-cache@v2
- with:
- prefix-key: v0-msrv
- save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: baptiste0928/cargo-install@v3
with:
@@ -143,9 +136,6 @@ jobs:
- name: πŸ’° Cache
uses: Swatinem/rust-cache@v2
- with:
- prefix-key: v0-udeps
- save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: baptiste0928/cargo-install@v3
with:
@@ -166,9 +156,6 @@ jobs:
- name: πŸ’° Cache
uses: Swatinem/rust-cache@v2
- with:
- prefix-key: v0-bench
- save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Install shells (zsh, fish)
run: |