chore: reopen changelog after 0.3.2 #109
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
| name: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" | |
| jobs: | |
| deps: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Verify module cache | |
| run: GOWORK=off go mod verify | |
| - name: Check go.mod tidy | |
| run: | | |
| GOWORK=off go mod tidy | |
| git diff --exit-code -- go.mod go.sum | |
| - name: Install govulncheck | |
| run: GOWORK=off go install golang.org/x/vuln/cmd/govulncheck@v1.4.0 | |
| - name: Run govulncheck | |
| run: GOWORK=off "$(go env GOPATH)/bin/govulncheck" ./... | |
| lint: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Check formatting | |
| run: | | |
| changed="$(gofmt -l .)" | |
| if [ -n "$changed" ]; then | |
| printf 'gofmt wants changes in:\n%s\n' "$changed" | |
| exit 1 | |
| fi | |
| - name: Vet | |
| run: GOWORK=off go vet ./... | |
| - name: Install deadcode | |
| run: GOWORK=off go install golang.org/x/tools/cmd/deadcode@v0.46.0 | |
| - name: Deadcode | |
| run: | | |
| output_file=$(mktemp) | |
| GOWORK=off "$(go env GOPATH)/bin/deadcode" -test ./... > "$output_file" | |
| if [ -s "$output_file" ]; then | |
| cat "$output_file" | |
| exit 1 | |
| fi | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Test | |
| run: GOWORK=off go test -count=1 ./... | |
| - name: Build CLI | |
| run: | | |
| GOWORK=off go build -trimpath \ | |
| -ldflags "-s -w -X github.com/openclaw/graincrawl/internal/buildinfo.Version=ci -X github.com/openclaw/graincrawl/internal/buildinfo.Commit=${GITHUB_SHA} -X github.com/openclaw/graincrawl/internal/buildinfo.Date=ci" \ | |
| -o bin/graincrawl ./cmd/graincrawl | |
| - name: Smoke test CLI control surface | |
| run: | | |
| set -euo pipefail | |
| output="$(./bin/graincrawl --help 2>&1)" | |
| printf '%s\n' "$output" | |
| printf '%s' "$output" | grep -q "graincrawl archives Granola" | |
| printf '%s' "$output" | grep -q "metadata" | |
| printf '%s' "$output" | grep -q "tui" | |
| version_output="$(./bin/graincrawl --json version)" | |
| printf '%s\n' "$version_output" | |
| printf '%s\n' "$version_output" | grep -q '"version"' | |
| tmp="$RUNNER_TEMP/graincrawl-smoke" | |
| cfg="$tmp/config.toml" | |
| db="$tmp/graincrawl.db" | |
| mkdir -p "$tmp/home" "$tmp/xdg-config" "$tmp/xdg-cache" "$tmp/xdg-state" | |
| env HOME="$tmp/home" XDG_CONFIG_HOME="$tmp/xdg-config" XDG_CACHE_HOME="$tmp/xdg-cache" XDG_STATE_HOME="$tmp/xdg-state" GRAINCRAWL_DB_PATH="$db" ./bin/graincrawl --config "$cfg" --json init | grep -q '"config_path"' | |
| env HOME="$tmp/home" XDG_CONFIG_HOME="$tmp/xdg-config" XDG_CACHE_HOME="$tmp/xdg-cache" XDG_STATE_HOME="$tmp/xdg-state" ./bin/graincrawl --config "$cfg" --json metadata | grep -q '"schema_version"' | |
| env HOME="$tmp/home" XDG_CONFIG_HOME="$tmp/xdg-config" XDG_CACHE_HOME="$tmp/xdg-cache" XDG_STATE_HOME="$tmp/xdg-state" ./bin/graincrawl --config "$cfg" --json status | grep -q '"databases"' | |
| env HOME="$tmp/home" XDG_CONFIG_HOME="$tmp/xdg-config" XDG_CACHE_HOME="$tmp/xdg-cache" XDG_STATE_HOME="$tmp/xdg-state" ./bin/graincrawl --config "$cfg" --json tui | grep -q '^\[' | |
| env HOME="$tmp/home" XDG_CONFIG_HOME="$tmp/xdg-config" XDG_CACHE_HOME="$tmp/xdg-cache" XDG_STATE_HOME="$tmp/xdg-state" ./bin/graincrawl --config "$cfg" --json snapshot create --out "$tmp/snapshot" | grep -q '"manifest"' | |
| release-check: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Snapshot release build | |
| uses: goreleaser/goreleaser-action@v7.2.2 | |
| with: | |
| distribution: goreleaser | |
| version: "~> v2" | |
| args: release --snapshot --clean --skip=publish |