fix: redact Upstash Box API errors #2177
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: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| env: | |
| GOFLAGS: -mod=readonly -trimpath | |
| GOTOOLCHAIN: local | |
| jobs: | |
| go: | |
| name: Go | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Set up Go | |
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: false | |
| - name: Check formatting | |
| shell: bash | |
| run: | | |
| mapfile -t files < <(git ls-files '*.go') | |
| if [ "${#files[@]}" -gt 0 ]; then | |
| diff="$(gofmt -l "${files[@]}")" | |
| if [ -n "$diff" ]; then | |
| echo "$diff" | |
| exit 1 | |
| fi | |
| fi | |
| - name: Vet | |
| run: go vet ./... | |
| - name: Deadcode | |
| run: | | |
| output_file=$(mktemp) | |
| go run golang.org/x/tools/cmd/deadcode@v0.45.0 -test ./... > "$output_file" | |
| if [ -s "$output_file" ]; then | |
| cat "$output_file" | |
| exit 1 | |
| fi | |
| - name: Test | |
| run: go test -race ./... | |
| - name: Test all Go modules | |
| run: scripts/test-go-modules.sh | |
| - name: Coverage | |
| run: scripts/check-go-coverage.sh 90.0 | |
| - name: Build | |
| run: go build -trimpath -o /tmp/crabbox ./cmd/crabbox | |
| apple-vz: | |
| name: Apple VZ | |
| runs-on: macos-15 | |
| timeout-minutes: 15 | |
| env: | |
| CGO_CFLAGS: -mmacosx-version-min=13.0 | |
| CGO_LDFLAGS: -mmacosx-version-min=13.0 | |
| MACOSX_DEPLOYMENT_TARGET: "13.0" | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Verify Apple Silicon runner | |
| run: test "$(uname -m)" = arm64 | |
| - name: Set up Go | |
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: false | |
| - name: Vet native helper | |
| run: go vet ./internal/applevzhelper ./cmd/crabbox-apple-vz-helper | |
| - name: Test native helper and provider | |
| run: go test -race ./internal/applevzhelper ./internal/providers/applevz | |
| - name: Build native helper | |
| run: go build -trimpath -o /tmp/crabbox-apple-vz-helper ./cmd/crabbox-apple-vz-helper | |
| - name: Verify native helper deployment target | |
| run: | | |
| minos="$(vtool -show-build /tmp/crabbox-apple-vz-helper | awk '$1 == "minos" { print $2; exit }')" | |
| test "$minos" = "13.0" | |
| worker: | |
| name: Worker | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Set up Node | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| cache-dependency-path: worker/package-lock.json | |
| - name: Install | |
| run: npm ci | |
| working-directory: worker | |
| - name: Format | |
| run: npm run format:check | |
| working-directory: worker | |
| - name: Lint | |
| run: npm run lint | |
| working-directory: worker | |
| - name: Typecheck | |
| run: npm run check | |
| working-directory: worker | |
| - name: Typecheck Node runtime | |
| run: npm run check:node | |
| working-directory: worker | |
| - name: Test | |
| run: npm test | |
| working-directory: worker | |
| - name: Build | |
| run: npm run build | |
| working-directory: worker | |
| - name: Build Cloudflare Dynamic Workers | |
| run: npm run build:cloudflare-dynamic-workers | |
| working-directory: worker | |
| - name: Build Node runtime | |
| run: npm run build:node | |
| working-directory: worker | |
| - name: Check runtime base image pins | |
| run: node scripts/check-docker-base-images.mjs | |
| - name: Build Node runtime image | |
| run: docker build -f worker/Dockerfile.node worker | |
| scripts: | |
| name: Scripts | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Set up Node | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 24 | |
| - name: Set up Go | |
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: false | |
| - name: Install script dependencies | |
| run: sudo apt-get update && sudo apt-get install -y ripgrep | |
| - name: Test | |
| run: node --test scripts/*.test.js | |
| docs: | |
| name: Docs | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Set up Node | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 24 | |
| - name: Set up Go | |
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: false | |
| - name: Check docs | |
| run: scripts/check-docs.sh | |
| release-check: | |
| name: Release Check | |
| runs-on: macos-15 | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Verify Apple Silicon runner | |
| run: test "$(uname -m)" = arm64 | |
| - name: Set up Go | |
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: false | |
| - name: Snapshot release build | |
| uses: goreleaser/goreleaser-action@5daf1e915a5f0af01ddbcd89a43b8061ff4f1a89 # v7.2.2 | |
| with: | |
| distribution: goreleaser | |
| version: "~> v2" | |
| args: release --snapshot --clean --skip=publish --parallelism 1 | |
| - name: Verify snapshot helper deployment target | |
| run: | | |
| helper="$(find dist -type f -name crabbox-apple-vz-helper -print -quit)" | |
| if [ -z "$helper" ] || [ ! -x "$helper" ]; then | |
| echo "::error::snapshot Apple VZ helper not found" | |
| exit 1 | |
| fi | |
| minos="$(vtool -show-build "$helper" | awk '$1 == "minos" { print $2; exit }')" | |
| if [ "$minos" != "13.0" ]; then | |
| echo "::error::Apple VZ helper minimum macOS is $minos, expected 13.0" | |
| exit 1 | |
| fi |