Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI

on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main

jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.25']

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Verify dependencies
run: go mod verify

- name: Run go vet
run: go vet ./...

- name: Run golangci-lint
run: go tool github.com/golangci/golangci-lint/v2/cmd/golangci-lint run --timeout=5m

- name: Run tests
run: go test -v -race -count=5 -coverprofile=coverage.out ./...

- name: Upload coverage
uses: codecov/codecov-action@v4
if: matrix.go-version == '1.25'
with:
file: ./coverage.out
fail_ci_if_error: false
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.idea/
build/
release/
/renderizer
/coverage*
33 changes: 26 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ PREFIX ?= usr/local

#

.PHONY : all release snapshot vet test examples tag
.PHONY : help
.DEFAULT_GOAL := snapshot

#
Expand All @@ -24,31 +22,52 @@ TEST_SOURCES = $(filter %_test.go, $(ALL_SOURCES))

#

build snapshot: vet test $(BINARY) # Build snapshot
.PHONY: build snapshot
build snapshot: lint test $(BINARY) # Build snapshot

.PHONY: all
all: release ## Make everything

$(BINARY): $(MAIN_SOURCES)
goreleaser --snapshot --rm-dist --skip-publish --skip-validate
go tool github.com/goreleaser/goreleaser --snapshot --rm-dist --skip-publish --skip-validate

release: vet test ## Build releases
.PHONY: release
release: lint test ## Build releases
$(MAKE) full-release BUILD=

.PHONY: full-release
full-release: tag
goreleaser --rm-dist --skip-publish
go tool github.com/goreleaser/goreleaser --rm-dist --skip-publish

.PHONY: tag
tag:
git tag -f -m $(TAG) $(TAG)

.PHONY: vet test
vet test: ## Run tests or vet
go $@ ./...

tests examples: snapshot
.PHONY: lint
lint: vet ## Run tests or vet
go tool github.com/golangci/golangci-lint/v2/cmd/golangci-lint run

.PHONY: fmt
fmt: ## Run tests or vet
go tool golang.org/x/tools/cmd/goimports -w cmd pkg

.PHONY: tests
tests: snapshot examples
go test -v -race -count=5 -coverprofile=coverage.out ./...

.PHONY: examples
examples:
@scripts/test-iterate test examples

.PHONY: clean
clean:
rm -rf build

.PHONY: help
help: ## This help.
@echo $(APP_NAME)
@echo MAIN_SOURCES=$(MAIN_SOURCES)
Expand Down
Loading