Try out just

This commit is contained in:
Thorben Günther 2024-11-03 19:38:20 +01:00
parent a4e11fc6c4
commit b3d5045ca7
No known key found for this signature in database
GPG key ID: 415CD778D8C5AFED
2 changed files with 23 additions and 6 deletions

View file

@ -3,6 +3,7 @@ packages:
- docker - docker
- docker-buildx - docker-buildx
- go - go
- just
- revive - revive
- staticcheck - staticcheck
secrets: secrets:
@ -12,18 +13,16 @@ sources:
tasks: tasks:
- test: | - test: |
cd ntfy-alertmanager cd ntfy-alertmanager
go test -v ./... just test
- lint: | - lint: |
cd ntfy-alertmanager cd ntfy-alertmanager
go vet ./... just lint
staticcheck ./...
revive ./...
- build: | - build: |
cd ntfy-alertmanager cd ntfy-alertmanager
go build just build
- gofmt: | - gofmt: |
cd ntfy-alertmanager cd ntfy-alertmanager
test -z $(gofmt -l .) just gofmt
- dev-image: | - dev-image: |
cd ntfy-alertmanager/docker cd ntfy-alertmanager/docker
if [ "$BUILD_SUBMITTER" != "git.sr.ht" ] || [ "$(git rev-parse master)" != "$(git rev-parse HEAD)" ] if [ "$BUILD_SUBMITTER" != "git.sr.ht" ] || [ "$(git rev-parse master)" != "$(git rev-parse HEAD)" ]

18
.justfile Normal file
View file

@ -0,0 +1,18 @@
test:
go test -v ./...
lint:
go vet ./...
staticcheck ./...
revive ./...
gofmt:
gofmt -l .
test -z $(gofmt -l .)
build:
go build
upgrade-deps:
go get -u ./...
go mod tidy