feat: resolve worktree by name, path, or realpath #32
Workflow file for this run
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] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Nix | |
| uses: NixOS/nix-installer-action@main | |
| - name: Cache Nix store | |
| uses: nix-community/cache-nix-action@v6 | |
| with: | |
| primary-key: nix-${{ runner.os }}-${{ hashFiles('flake.lock') }} | |
| restore-prefixes-first-match: nix-${{ runner.os }}- | |
| - name: Run shellcheck | |
| run: nix develop --command shellcheck git-wt completions/*.bash | |
| - name: Check formatting | |
| run: nix fmt -- --fail-on-change | |
| test: | |
| name: Test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install bats | |
| run: | | |
| if [[ "$RUNNER_OS" == "Linux" ]]; then | |
| sudo apt-get update && sudo apt-get install -y bats | |
| else | |
| brew install bats-core | |
| fi | |
| - name: Run tests | |
| run: bats tests/ | |
| build: | |
| name: Build (Nix) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Nix | |
| uses: NixOS/nix-installer-action@main | |
| - name: Cache Nix store | |
| uses: nix-community/cache-nix-action@v6 | |
| with: | |
| primary-key: nix-${{ runner.os }}-${{ hashFiles('flake.lock') }} | |
| restore-prefixes-first-match: nix-${{ runner.os }}- | |
| - name: Check flake | |
| run: nix flake check | |
| - name: Build package | |
| run: nix build | |
| - name: Test executable runs | |
| run: ./result/bin/git-wt --help |