Repository navigation
feat(worktree): release a Claude session's checkout when the session ends #2364
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: Check | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: check-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check: | |
| if: github.event_name != 'pull_request' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f | |
| with: | |
| determinate: false | |
| # The full history holds the merge base with the base branch. | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Install dependencies | |
| run: nix develop --command just install | |
| # `quest worktree run` owns processes through a systemd user scope, which the tests exercise. | |
| - name: Start a systemd user manager | |
| run: | | |
| sudo loginctl enable-linger "$USER" | |
| sudo systemctl start "user@$(id -u).service" | |
| echo "XDG_RUNTIME_DIR=/run/user/$(id -u)" >> "$GITHUB_ENV" | |
| - name: Check | |
| run: nix develop --command just check | |
| - name: Test | |
| run: nix develop --command just test | |
| - name: Check Nix package | |
| run: nix flake check | |
| lifecycle: | |
| name: lifecycle (${{ matrix.runner }}) | |
| if: github.event_name != 'pull_request' | |
| strategy: | |
| fail-fast: false | |
| # Hosted macOS runners can queue past the timeout, which then reports a job | |
| # that never ran as failed. Main checks the flake's macOS build, | |
| # and tags check the released binaries. | |
| matrix: | |
| runner: [ubuntu-latest, macos-14] | |
| runs-on: ${{ matrix.runner }} | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f | |
| with: | |
| determinate: false | |
| - name: Install the checkout with the flake's source build | |
| run: nix build --out-link "$RUNNER_TEMP/quest-lifecycle-install" .#quest | |
| - name: Verify the installed CLI lifecycle | |
| shell: bash | |
| run: nix develop --command bash scripts/lifecycle-check.sh "$RUNNER_TEMP/quest-lifecycle-install/bin/quest" | |
| # Work outside the job holds a fresh macOS runner's load above its CPUs. | |
| - name: Check that the gate admits and owns its command's descendants | |
| shell: bash | |
| run: bash scripts/gate-check.sh "$RUNNER_TEMP/quest-lifecycle-install/bin/quest" |