Repository navigation
build(deps): bump actions/setup-node from 7.0.0 to 7.1.0 #829
Workflow file for this run
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 | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| docs: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup Node | |
| uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 | |
| with: | |
| node-version: 26 | |
| - name: Test cloud publisher | |
| run: node --test scripts/publish-cloud.test.mjs | |
| - name: Test documentation build | |
| run: node --test scripts/build-docs-site.test.mjs | |
| - name: Build documentation | |
| run: node scripts/build-docs-site.mjs | |
| lint: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Lint | |
| uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0 | |
| with: | |
| version: v2.14.0 | |
| - name: Install analyzers | |
| run: | | |
| go install mvdan.cc/gofumpt@v0.12.0 | |
| - name: Vet | |
| run: go vet ./... | |
| - name: Staticcheck | |
| run: go tool staticcheck ./... | |
| - name: Deadcode | |
| run: | | |
| output_file=$(mktemp) | |
| go tool deadcode -test ./... > "$output_file" | |
| if [ -s "$output_file" ]; then | |
| cat "$output_file" | |
| exit 1 | |
| fi | |
| - name: Gofumpt | |
| run: | | |
| changed="$("$(go env GOPATH)/bin/gofumpt" -l .)" | |
| if [ -n "$changed" ]; then | |
| printf 'gofumpt wants changes in:\n%s\n' "$changed" | |
| exit 1 | |
| fi | |
| - name: Gosec | |
| run: | | |
| go tool gosec -exclude=G101,G115,G202,G301,G304 ./... | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Test source reconciliation entry point | |
| run: go test -count=1 scripts/reconcile_cloud_source.go scripts/reconcile_cloud_source_test.go | |
| - name: Test with race detector and coverage | |
| run: go test -count=1 -race ./... -coverprofile=coverage.out | |
| - name: Exclude generated code from coverage | |
| run: grep -v '^github.com/openclaw/discrawl/internal/store/storedb/' coverage.out > coverage.filtered.out | |
| - name: Enforce coverage floor | |
| run: | | |
| total="$(go tool cover -func=coverage.filtered.out | awk '/^total:/ { sub(/%$/, "", $3); print $3 }')" | |
| awk -v total="$total" 'BEGIN { | |
| if (total == "") { | |
| print "missing coverage total" | |
| exit 1 | |
| } | |
| if (total + 0 < 85.0) { | |
| printf("coverage %.1f%% is below 85%%\n", total + 0) | |
| exit 1 | |
| } | |
| printf("coverage %.1f%%\n", total + 0) | |
| }' | |
| - name: Build | |
| run: go build -o bin/discrawl ./cmd/discrawl | |
| - name: Smoke test CLI control surface | |
| run: | | |
| set -euo pipefail | |
| output="$(./bin/discrawl help)" | |
| printf '%s\n' "$output" | |
| printf '%s' "$output" | grep -q "metadata" | |
| printf '%s' "$output" | grep -q "tui" | |
| test -n "$(./bin/discrawl --version)" | |
| ./bin/discrawl metadata --json | grep -q '"schema_version"' | |
| ./bin/discrawl status --json | grep -q '"databases"' | |
| ./bin/discrawl tui --json | grep -q '^\[' | |
| native-smoke: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Test entrypoint and configuration | |
| run: go test -count=1 ./cmd/discrawl ./internal/config | |
| - name: Build and run native CLI | |
| shell: bash | |
| env: | |
| BINARY: bin/discrawl${{ runner.os == 'Windows' && '.exe' || '' }} | |
| run: | | |
| set -euo pipefail | |
| go build -o "$BINARY" ./cmd/discrawl | |
| "$BINARY" --version | |
| "$BINARY" metadata --json > metadata.json | |
| grep -q '"schema_version"' metadata.json | |
| "$BINARY" help tui > tui-help.txt | |
| grep -q 'Usage: discrawl tui' tui-help.txt | |
| deps: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Verify module cache | |
| run: go mod verify | |
| - name: Check go.mod tidy | |
| run: | | |
| go mod tidy | |
| git diff --exit-code -- go.mod go.sum | |
| - name: Run govulncheck | |
| run: go tool govulncheck ./... | |
| release-check: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Snapshot release build | |
| uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # v7.2.3 | |
| with: | |
| distribution: goreleaser | |
| version: v2.18.2 | |
| args: release --snapshot --clean --skip=publish | |
| kiwi-helper: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: tools/discrawl-kiwi/go.mod | |
| cache-dependency-path: tools/discrawl-kiwi/go.sum | |
| - name: Install Kiwi 0.24.0 | |
| working-directory: tools/discrawl-kiwi | |
| run: bash install-kiwi.sh | |
| - name: Test Go binding helper | |
| working-directory: tools/discrawl-kiwi | |
| run: go test -count=1 ./... | |
| secrets: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Install gitleaks | |
| run: go install github.com/zricethezav/gitleaks/v8@v8.30.1 | |
| - name: Scan git history | |
| run: | | |
| "$(go env GOPATH)/bin/gitleaks" git --no-banner --redact | |
| - name: Scan working tree | |
| run: | | |
| "$(go env GOPATH)/bin/gitleaks" dir . --no-banner --redact | |
| ja-helper: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: tools/discrawl-ja/go.mod | |
| cache-dependency-path: tools/discrawl-ja/go.sum | |
| - name: Test Japanese helper | |
| working-directory: tools/discrawl-ja | |
| run: go test -count=1 ./... | |
| zh-helper: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: tools/discrawl-zh/go.mod | |
| cache-dependency-path: tools/discrawl-zh/go.sum | |
| - name: Test Chinese helper | |
| working-directory: tools/discrawl-zh | |
| run: go test -count=1 ./... |