0
1
Fork 0
mirror of https://github.com/actions/checkout synced 2024-06-16 14:18:19 +02:00

ci: verify that an existing sparse checkout can be made unsparse

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>
This commit is contained in:
Johannes Schindelin 2024-01-31 14:57:38 +01:00
parent c4cda129b7
commit 6f108b29f4

View file

@ -95,6 +95,16 @@ 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
shell: bash
run: set -x && ls -l sparse-checkout/src/git-command-manager.ts
# Sparse checkout (non-cone mode)
- name: Sparse checkout (non-cone mode)
uses: ./
@ -279,4 +289,4 @@ jobs:
- name: Fix Checkout v3
uses: actions/checkout@v3
with:
path: v3
path: v3