Repository navigation
test: run the release's tarball check on a valid, a wrong and an extra file - #6
Conversation
…a file The publish job's check was tested only for the substrings it holds, so replacing every exit 1 with : still passed. The test now runs the step's script in a temporary directory: the valid tarball exits 0 and sets TARBALL and SHA512, a wrong digest, an extra or hidden file, a missing tarball and a tarball name that is not a file name exit 1 and set nothing.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
The shim directory sat in the list the first test's afterEach empties, so later tarball checks put a deleted directory on PATH and failed on hosts whose base64 rejects -w0. It is now removed in afterAll, apart from the per-test directories.
|
@coderabbitai review |
✅ Action performedReview finished.
|
Follow-up to #5 (P3 from its delta review).
test/release-workflow.test.tschecked that the publish job's tarball check contains the right commands and comparisons, but not that a failed check stops the job: replacing everyexit 1in the workflow with:still passed all tests.The test now extracts the check step's script from
release.ymland runs it withbash -ein a temporary directory with areleasedirectory, the way the runner does:TARBALLandSHA512appended toGITHUB_ENV;.tgz, a leading dash, empty): exit 1, an::error::line, and nothing appended toGITHUB_ENV.On a machine whose
base64has no-w0(macOS) the test puts a shim for it onPATH; on the runner GNU's is used as it is.Verified:
pnpm typecheck,pnpm testandpnpm check:packagepass. With everyexit 1replaced by:ten of the new tests fail; withls -Achanged tolsthe hidden-file test fails.Summary by CodeRabbit