feat: add archive test source for ZIP and tar.gz files#179
Merged
Conversation
Add a new `archive` source type under `tests.source` that supports downloading and extracting ZIP or tar.gz archives from URLs or local paths, then discovering tests via glob patterns within the extracted contents. Inner tarballs (e.g. GitHub Actions artifacts) are automatically extracted.
GitHub Actions artifact browser URLs return 404 for plain HTTP GET. Detect the URL pattern and convert to the GitHub API download endpoint with bearer token authentication.
Log total file size at download start, periodic progress every 10 MiB with percentage (when Content-Length is known), and final size on completion. Also warn when GitHub artifact URL is detected without a configured token.
Probe the server with a HEAD request for Accept-Ranges support. When supported and the file is >= 10 MiB, download in parallel using 4 workers with 25 MiB chunks. Falls back to sequential download when the server does not support range requests or the file is small. Progress logging works across concurrent workers using atomic counters.
Hash the configured URL to produce a stable cache key in the cache directory. On subsequent runs with the same URL, the cached file is reused without making any HTTP requests. Downloads use atomic rename to prevent partial cache files.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
archivesource type undertests.sourcethat downloads and extracts ZIP or tar.gz archives from URLs or local paths, then discovers tests via glob patterns within extracted contentsBENCHMARKOOR_RUNNER_GITHUB_TOKENinto the Docker container in the GitHub Actiontestsarray crash in UI suite cell tooltipExample config
Test plan
IsConfigured()test for archive source