Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Tidy cfl
run: cd tools/cfl && go mod tidy && git diff --exit-code go.mod go.sum
- name: Build cfl
run: go build -v ./tools/cfl/...
- name: Test cfl
Expand All @@ -48,6 +50,8 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Tidy jtk
run: cd tools/jtk && go mod tidy && git diff --exit-code go.mod go.sum
- name: Build jtk
run: go build -v ./tools/jtk/...
- name: Test jtk
Expand Down Expand Up @@ -90,6 +94,8 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Tidy shared
run: cd shared && go mod tidy && git diff --exit-code go.mod go.sum
- name: Build shared
run: go build -v ./shared/...
- name: Test shared
Expand Down
29 changes: 21 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,35 @@
.PHONY: build test lint all build-cfl build-jtk test-shared lint-shared install-hooks
.PHONY: build test lint tidy check all build-cfl build-jtk test-shared lint-shared install-hooks

all: build test lint
# CI gate: everything that must pass before merge
check: tidy lint test build

all: check

# Build all binaries into bin/
build:
go build -v ./shared/...
go build -v ./tools/cfl/cmd/cfl
go build -v ./tools/jtk/cmd/jtk
go build -v -o bin/cfl ./tools/cfl/cmd/cfl
go build -v -o bin/jtk ./tools/jtk/cmd/jtk

# Run tests with race detector
test:
go test -v ./shared/...
go test -v ./tools/cfl/...
go test -v ./tools/jtk/...
go test -race ./shared/...
go test -race ./tools/cfl/...
go test -race ./tools/jtk/...

# Lint with golangci-lint (config in each module's .golangci.yml)
lint:
cd shared && golangci-lint run
cd tools/cfl && golangci-lint run
cd tools/jtk && golangci-lint run

# Tidy and verify modules are clean
tidy:
cd shared && go mod tidy
cd tools/cfl && go mod tidy
cd tools/jtk && go mod tidy
git diff --exit-code shared/go.mod shared/go.sum tools/cfl/go.mod tools/cfl/go.sum tools/jtk/go.mod tools/jtk/go.sum

# Build individual tools to bin/
build-cfl:
go build -v -o bin/cfl ./tools/cfl/cmd/cfl

Expand Down
Loading
Loading