Skip to content

Commit

Permalink
lu: Application framework
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhicks committed Jun 28, 2024
1 parent 8537e7e commit 48de7d1
Show file tree
Hide file tree
Showing 32 changed files with 3,716 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/go.yml
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
23 changes: 23 additions & 0 deletions Makefile
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}'
Loading

0 comments on commit 48de7d1

Please sign in to comment.