Skip to content

Commit

Permalink
ci: verify that an existing sparse checkout can be made unsparse
Browse files Browse the repository at this point in the history
There are use cases in particular with non-ephemeral runners where an
existing worktree (that has been initialized as a sparse checkout) is
reused in subsequent CI runs (where `actions/checkout` is run _without_
any `sparse-checkout` parameter).

In these scenarios, we need to make sure that the sparse checkout is
disabled before checking out the files.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Jan 31, 2024
1 parent c4cda12 commit 29f6b52
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/test.yml
Expand Up @@ -95,6 +95,15 @@ jobs:
- name: Verify sparse checkout
run: __test__/verify-sparse-checkout.sh

# Disabled sparse checkout in existing checkout
- name: Disabled sparse checkout
uses: ./
with:
path: sparse-checkout

- name: Verify disabled sparse checkout
run: set -x && test -f src/git-command-manager.ts

# Sparse checkout (non-cone mode)
- name: Sparse checkout (non-cone mode)
uses: ./
Expand Down

0 comments on commit 29f6b52

Please sign in to comment.