docs: update & document dev commands

This commit is contained in:
Gabriel Augendre 2024-03-27 22:59:32 +01:00
parent 03bce0f06d
commit 384f8008b9
4 changed files with 31 additions and 2 deletions

View file

@ -27,4 +27,4 @@ jobs:
- name: Build - name: Build
run: go build -v ./... run: go build -v ./...
- name: Test - name: Test
run: go test -v ./... -race run: make test

View file

@ -12,3 +12,10 @@ repos:
rev: v1.57.1 rev: v1.57.1
hooks: hooks:
- id: golangci-lint-full - id: golangci-lint-full
- repo: local
hooks:
- id: go-test
name: go test ./...
language: golang
types_or: [go]
entry: make test

View file

@ -1,3 +1,7 @@
.PHONY: lint .PHONY: lint
lint: lint:
pre-commit run --all-files golangci-lint-full pre-commit run --all-files
.PHONY: test
test:
go test -race -v ./...

View file

@ -28,3 +28,21 @@ func notOk() {
} }
} }
``` ```
## Development
Setup pre-commit locally:
```bash
pre-commit install
```
Run tests & linter:
```bash
make lint test
```
To release, just publish a git tag:
```bash
git tag -a v0.1.0 -m "v0.1.0"
git push --follow-tags
```