-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
3,716 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Go | ||
|
||
on: | ||
push: | ||
branches: [ "**" ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
go: ['1.21', '1.22'] | ||
|
||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
id: go | ||
|
||
- name: Vet | ||
run: make vet | ||
|
||
- name: Test | ||
run: make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
PROJECT_NAME := "lu" | ||
PKG := "github.com/luno/$(PROJECT_NAME)" | ||
PKG_LIST := $(shell go list ${PKG}/... | grep -v /vendor/) | ||
|
||
.PHONY: vet fmt checkfmt test race | ||
|
||
vet: ## Lint the files | ||
@go vet ${PKG_LIST} | ||
|
||
fmt: ## Format the files | ||
@gofumpt -w . | ||
|
||
checkfmt: ## Check that files are formatted | ||
@./checkfmt.sh | ||
|
||
test: ## Run unittests | ||
@go test -short ${PKG_LIST} | ||
|
||
race: ## Run data race detector | ||
@go test -race -short ${PKG_LIST} | ||
|
||
help: ## Display this help screen | ||
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' |
Oops, something went wrong.