Allow git-lfs-transfer integration tests to be skipped #4677
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces the new environment variable
TEST_SKIP_LFS_TRANSFER
which offers the possibility to skip git-lfs-transfer tests based on scutiger-lfs while also running within CI:This is required since it's currently not possible to disable the use of git-lfs-transfer when running within a CI build (detected automatically via
CI
variable). Since git-lfs-transfer has to be installed on a systems via other means, most external CI builds will fail as they can't use the git-lfs Docker test image, which preinstalls git-lfs-transfer.This is patch needed to make git-lfs packaging work for Linux distributions like Alpine Linux (e.g. see https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/26213).
An alternative to the approach used within this PR would be to change the logic to a positive one, meaning replacing the current
$CI && !$TEST_SKIP_LFS_TRANSFER
with an e.g.$USE_GIT_LFS_TRANSFER
one. This would disable those tests on all environments, allowing the git-lfs CI test to explicitly enable them./cc @bk2204