Skip to content

Commit e2063bd

Browse files
committed
build: generate frontend assets in ci
1 parent 94f6fa7 commit e2063bd

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,13 @@ jobs:
5353
exit 1
5454
fi
5555
56+
- name: Build frontend assets
57+
run: make build-frontend
58+
5659
- name: Lint
5760
uses: golangci/golangci-lint-action@v4
5861
with:
59-
version: latest
62+
version: v2.4.0
6063
args: --timeout=10m
6164

6265
- name: Security check with gosec

.github/workflows/verify.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
with:
1919
go-version: 1.22
2020

21-
- name: Install golangci-lint
21+
- name: Install golangci-lint v2
2222
run: |
23-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$(go env GOPATH)/bin" latest
23+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$(go env GOPATH)/bin" v2.4.0
2424
2525
- name: Run verification task
2626
run: make verify

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ build: $(FRONTEND_ASSETS) ## Build the plugin binary
2929
pkg/plugin/assets/ai-chat.js: build-frontend ;
3030
pkg/plugin/assets/ai-chat.css: build-frontend ;
3131

32-
test: ## Run tests with coverage
32+
test: $(FRONTEND_ASSETS) ## Run tests with coverage
3333
go test -v -race -coverprofile=coverage.out ./...
3434
go tool cover -func=coverage.out | tail -n 1
3535

@@ -76,19 +76,19 @@ lint-check: ## Run golangci-lint without fixes
7676
vet: ## Run go vet
7777
go vet ./...
7878

79-
verify: ## Format, lint, vet and test Go code
79+
verify: build-frontend ## Format, lint, vet and test Go code
8080
$(MAKE) fmt
8181
$(MAKE) lint-check
8282
$(MAKE) vet
8383
$(MAKE) test
8484

85-
check: ## Run all checks (fmt, vet, lint, test)
85+
check: build-frontend ## Run all checks (fmt, vet, lint, test)
8686
$(MAKE) fmt
8787
$(MAKE) vet
8888
$(MAKE) lint-check
8989
$(MAKE) test
9090

91-
benchmark: ## Run benchmark tests
91+
benchmark: $(FRONTEND_ASSETS) ## Run benchmark tests
9292
go test -bench=. -benchmem -run=^$$ ./...
9393

9494
docker-build: ## Build Docker image

0 commit comments

Comments
 (0)