githubEdit

GitHub actions

PR Checks Overview

Every pull request runs the following GitHub Actions workflows. All checks must pass before a PR can be merged.

Workflow
File
Description

Check git status

pr_check_git_status.yml

Ensures all generated/formatted files are committed

Lint

pr_lint.yml

Runs golangci-lint

Build & Test

pr_build.yml

Runs unit tests and builds binaries via GoReleaser

Check: git status

The git status workflow runs formatting and code generation commands, then verifies no files were modified. If any command produces uncommitted changes, that specific check fails.

Each check runs as a separate job, so you can immediately see which one failed in the PR checks UI.

Check: go fmt

What it does: Formats all Go source files using go fmt.

How to fix locally:

go fmt ./...

Commit the resulting changes.

Check: prettier

What it does: Formats pkg/js/helpers.js using Prettierarrow-up-right.

How to fix locally:

Commit the resulting changes. Prettier configuration is in .prettierrc.

Check: fmtjson

What it does: Formats all JSON files in the repository (except package-lock.json) using bin/fmtjson.

How to fix locally:

Commit the resulting changes.

Check: go mod tidy

What it does: Cleans up go.mod and go.sum by removing unused dependencies and adding missing ones.

How to fix locally:

Commit the resulting changes to go.mod and go.sum.

Check: go generate

What it does: Runs all //go:generate directives in the codebase. This generates TypeScript type definitions, the feature matrix, and the OWNERS file. Requires stringer to be installed.

How to fix locally:

Commit the resulting changes.

Check: go fix

What it does: Runs go fix to update packages to use newer APIs when Go introduces changes.

How to fix locally:

Commit the resulting changes.

Lint

Runs golangci-lintarrow-up-right with the configuration in .golangci.yml.

How to fix locally:

See .golangci.yml for the list of enabled linters and their settings.

Build & Test

Runs all unit tests with gotestsum and builds binaries for all platforms using GoReleaser.

How to run locally:

Running all checks at once

The bin/generate-all.sh script runs most of the above checks in sequence:

This is useful before committing to catch all formatting and generation issues at once.

Last updated