0
0
Fork 0
mirror of https://github.com/actions/checkout.git synced 2024-12-27 07:13:31 +01:00
checkout/__test__
Johannes Schindelin aadec89964
Explicitly disable sparse checkout unless asked for (#1598)
When a worktree is reused by actions/checkout and the first time sparse checkout was enabled, we need to ensure that the second time it is only a sparse checkout if explicitly asked for. Otherwise, we need to disable the sparse checkout so that a full checkout is the outcome of this Action.

## Details
* If no `sparse-checkout` parameter is specified, disable it

This should allow users to reuse existing folders when running
`actions/checkout` where a previous run asked for a sparse checkout but
the current run does not ask for a sparse checkout.

This fixes https://github.com/actions/checkout/issues/1475

There are use cases in particular with non-ephemeral (self-hosted) 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.

### Also includes:

* npm run build
* ci: verify that an existing sparse checkout can be made unsparse
* Added a clarifying comment about test branches.
* `test-proxy` now uses newly-minted `test-ubuntu-git` container image from ghcr.io

---------

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Co-authored-by: John Wesley Walker III <81404201+jww3@users.noreply.github.com>
2024-02-21 13:56:19 +01:00
..
git-auth-helper.test.ts Explicitly disable sparse checkout unless asked for (#1598) 2024-02-21 13:56:19 +01:00
git-command-manager.test.ts Support fetching without the --progress option (#1067) 2023-09-01 14:19:18 -04:00
git-directory-helper.test.ts Explicitly disable sparse checkout unless asked for (#1598) 2024-02-21 13:56:19 +01:00
git-version.test.ts Convert checkout to a regular action (#70) 2019-12-03 10:28:59 -05:00
input-helper.test.ts Add support for partial checkout filters (#1396) 2023-09-22 13:30:36 -04:00
modify-work-tree.sh Convert checkout to a regular action (#70) 2019-12-03 10:28:59 -05:00
override-git-version.cmd Swap to Environment Files (#360) 2020-09-30 11:41:09 -04:00
override-git-version.sh Swap to Environment Files (#360) 2020-09-30 11:41:09 -04:00
ref-helper.test.ts update dev dependencies and react to new linting rules (#611) 2021-10-19 09:52:57 -05:00
retry-helper.test.ts update dev dependencies and react to new linting rules (#611) 2021-10-19 09:52:57 -05:00
verify-basic.sh update default branch (#305) 2020-07-14 09:23:30 -04:00
verify-clean.sh Convert checkout to a regular action (#70) 2019-12-03 10:28:59 -05:00
verify-fetch-filter.sh Add support for partial checkout filters (#1396) 2023-09-22 13:30:36 -04:00
verify-lfs.sh Convert checkout to a regular action (#70) 2019-12-03 10:28:59 -05:00
verify-no-unstaged-changes.sh update troubleshooting instructions to include 'npm run format' 2020-05-31 17:48:51 -04:00
verify-side-by-side.sh Convert checkout to a regular action (#70) 2019-12-03 10:28:59 -05:00
verify-sparse-checkout-non-cone-mode.sh Mark test scripts with Bash'isms to be run via Bash (#1377) 2023-06-09 11:05:29 -04:00
verify-sparse-checkout.sh Mark test scripts with Bash'isms to be run via Bash (#1377) 2023-06-09 11:05:29 -04:00
verify-submodules-false.sh add support for submodules (#173) 2020-03-05 14:21:59 -05:00
verify-submodules-recursive.sh add support for submodules (#173) 2020-03-05 14:21:59 -05:00
verify-submodules-true.sh add support for submodules (#173) 2020-03-05 14:21:59 -05:00