Add tasks for running tests with race detector and generating SHA256 checksums in Taskfile.yml

This commit is contained in:
2025-12-29 22:04:52 -06:00
parent 1f6f8580a8
commit 87fc514f32

View File

@@ -110,6 +110,11 @@ tasks:
cmds:
- '{{.GOCMD}} test -short -v ./...'
test-race:
desc: Run tests with race detector
cmds:
- '{{.GOCMD}} test -race -v ./...'
coverage:
desc: Generate test coverage report
cmds:
@@ -196,4 +201,17 @@ tasks:
install:
desc: Install dependencies
cmds:
- '{{.GOCMD}} mod download'
- '{{.GOCMD}} mod download'
checksum:
desc: Generate SHA256 checksum for binary (uses BINARY_PATH env var if set, otherwise defaults to bin/reticulum-go)
cmds:
- |
BINARY_PATH="${BINARY_PATH:-{{.BUILD_DIR}}/{{.BINARY_NAME}}}"
if [ -f "$BINARY_PATH" ]; then
sha256sum "$BINARY_PATH" > "${BINARY_PATH}.sha256"
echo "Generated checksum: ${BINARY_PATH}.sha256"
else
echo "Error: Binary not found at $BINARY_PATH"
exit 1
fi