.agent/workflows/validate-pr-check.md
You can validate the PR check workflow in two ways: manually running the commands or using act to simulate GitHub Actions.
Run the following commands in your terminal to mimic the workflow steps:
Validate Code
# Check formatting
test -z $(gofmt -l .)
# Run static analysis
go vet ./...
# Run tests
go test -v ./...
Verify Builds (Cross-compilation)
# Linux
GOOS=linux GOARCH=amd64 go build -v ./cmd/witr
GOOS=linux GOARCH=arm64 go build -v ./cmd/witr
# macOS
GOOS=darwin GOARCH=amd64 go build -v ./cmd/witr
GOOS=darwin GOARCH=arm64 go build -v ./cmd/witr
act (Docker required)If you have act installed, you can run the workflow in a container:
# Run the specific job
act -j validate
act -j build
# Or run the whole workflow for a pull_request event
act pull_request