Skip to content

Commit

Permalink
ci: setup a Justfile (#24)
Browse files Browse the repository at this point in the history
* ci: setup a Justfile

* build: drop support for windows

Yeah, no thanks.

```
go test -count=1 -v -race ./...
Windows Subsystem for Linux has no installed distributions.

Distributions can be installed by visiting the Microsoft Store:

https://aka.ms/wslstore

error: Recipe `test` failed on line 9 with exit code 1
Error: Process completed with exit code 1.
```
  • Loading branch information
shoenig authored Nov 5, 2024
1 parent 3466358 commit 1a36666
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ jobs:
- ubuntu-24.04
- ubuntu-22.04
- macos-14
- windows-2022
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: hashicorp/setup-golang@v1
with:
version-file: go.mod
- uses: extractions/setup-just@v2
- name: Run Go Test
run: |
go test -race -v ./...
just test
1 change: 0 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ builds:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
- freebsd
- openbsd
Expand Down
22 changes: 22 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
set shell := ["bash", "-u", "-c"]

# print just command targets
default:
@just --list

# run go test with race detector
test:
go test -count=1 -v -race ./...

# scan source with go vet tool
vet:
go vet ./...

# tidy go modules
tidy:
go mod tidy

# publish latest git tag as a github release
release:
envy exec gh-release goreleaser release --clean
$(MAKE) clean

0 comments on commit 1a36666

Please sign in to comment.