mirror of
https://github.com/Crocmagnon/fatcontext.git
synced 2024-11-22 07:58:05 +01:00
docs: update & document dev commands
This commit is contained in:
parent
03bce0f06d
commit
384f8008b9
4 changed files with 31 additions and 2 deletions
2
.github/workflows/go.yml
vendored
2
.github/workflows/go.yml
vendored
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
6
Makefile
6
Makefile
|
@ -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 ./...
|
||||||
|
|
18
README.md
18
README.md
|
@ -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
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in a new issue