diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68ecd87..81b3bcf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,3 +31,32 @@ jobs: - name: Test run: go test ./... -race -count=1 + + smoke: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 + with: + go-version-file: go.mod + cache: true + + - name: Build + run: go build -o fspeek ./cmd/fspeek + + - name: Version flag prints fspeek dev + run: | + output=$(./fspeek --version) + echo "Got: $output" + echo "$output" | grep -qE "^fspeek (dev|v?[0-9]+\.[0-9]+)" + + - name: No URL exits non-zero with usage + run: | + if output=$(./fspeek 2>&1); then + echo "Expected non-zero exit when no --url given" + exit 1 + fi + echo "$output" | grep -q "\-\-url" diff --git a/.github/workflows/release-smoke.yml b/.github/workflows/release-smoke.yml new file mode 100644 index 0000000..5066952 --- /dev/null +++ b/.github/workflows/release-smoke.yml @@ -0,0 +1,31 @@ +name: Release Smoke + +on: + release: + types: [published] + +jobs: + install-smoke: + runs-on: ubuntu-latest + container: golang:1.26.2-trixie + permissions: + contents: read + steps: + - name: Install fspeek + env: + TAG: ${{ github.ref_name }} + run: go install github.com/steadyfall/fspeek/cmd/fspeek@"$TAG" + + - name: Version flag prints release version + run: | + output=$(fspeek --version) + echo "Got: $output" + echo "$output" | grep -qE "^fspeek v?[0-9]+\.[0-9]+" + + - name: No URL exits non-zero with usage + run: | + if output=$(fspeek 2>&1); then + echo "Expected non-zero exit when no --url given" + exit 1 + fi + echo "$output" | grep -q "\-\-url" diff --git a/CHANGELOG.md b/CHANGELOG.md index b9c727f..ef22edb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [0.2.3.0] - 2026-04-20 + +### Added + +- **Smoke tests** — two CI smoke jobs verify the binary works after every build. The `smoke` job in `ci.yml` builds from source and checks that `--version` prints a recognizable version and that running with no `--url` exits non-zero with usage output. A new `release-smoke.yml` workflow triggers on every GitHub release publication: it enters a `golang:1.26.2-trixie` container, installs fspeek via `go install`, and runs the same checks to confirm the released module is installable and functional end-to-end. + +### Changed + +- No-URL smoke check now captures output on the first invocation and greps that, avoiding a redundant second binary run. +- Release smoke install step assigns `github.ref_name` to an env var before shell expansion. +- Release smoke version check no longer accepts `dev` — a release binary must print a real version string. + ## [0.2.2.0] - 2026-04-19 ### Added diff --git a/VERSION b/VERSION index 68cc747..517717a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.2.0 +0.2.3.0