Skip to content

Commit fe50bb5

Browse files
author
Tronje Krop
committed
feat: update deps (#73)
Signed-off-by: Tronje Krop <[email protected]>
1 parent e1315e8 commit fe50bb5

File tree

7 files changed

+39
-40
lines changed

7 files changed

+39
-40
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- name: Set up Go
1111
uses: actions/setup-go@v3
1212
with:
13-
go-version: 1.21
13+
go-version: 1.22.0
1414

1515
- name: Build and tests
1616
env:

.github/workflows/release.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ jobs:
1010
- name: Set up Go
1111
uses: actions/setup-go@v3
1212
with:
13-
go-version: 1.21
13+
go-version: 1.22.0
1414

1515
- name: Release new version
1616
env:
1717
GH_TOKEN: ${{ github.token }}
1818
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
19-
run: make --trace release
19+
run: make --trace version-release
2020

2121
- name: Publish new version
2222
env:
2323
GH_TOKEN: ${{ github.token }}
2424
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
25-
run: make --trace publish || true
25+
run: make --trace version-publish || true

Makefile

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,16 @@ else
77
$(warning warning: please customize variables in Makefile.vars)
88
endif
99

10-
# Setup desired go compiler environemt or defaults.
10+
# Setup default go compiler environment.
1111
export GO ?= go
12-
ifndef GOSETUP
13-
export GOBIN ?= $(shell $(GO) env GOPATH)/bin
14-
else ifeq ($(GOSETUP),local)
15-
export GOBIN := $(DIR_BUILD)/bin
16-
export PATH := $(GOBIN):$(PATH)
17-
else
18-
$(error error: unsupported go setup ($(GOSETUP)))
19-
endif
20-
12+
export GOPATH ?= $(shell $(GO) env GOPATH)
13+
export GOBIN ?= $(GOPATH)/bin
2114
# Setup go-make to utilize desired build and config scripts.
22-
GOMAKE_DEP ?= github.com/tkrop/[email protected].43
15+
GOMAKE_DEP ?= github.com/tkrop/[email protected].58
2316
# Request targets from go-make targets target.
2417
TARGETS := $(shell command -v $(GOBIN)/go-make >/dev/null || \
25-
go install $(GOMAKE_DEP) >/dev/stderr && \
26-
$(GOBIN)/go-make targets 2>/dev/null)
18+
$(GO) install $(GOMAKE_DEP) >/dev/stderr && \
19+
$(GOBIN)/go-make show-targets 2>/dev/null)
2720
# Declare all targets phony to make them available for auto-completion.
2821
.PHONY:: $(TARGETS)
2922

Makefile.vars

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Setup default test timeout (default: 10s).
2+
TEST_TIMEOUT := 12s
3+
# Setup when to push images (default: pulls [never, pulls, merges])
4+
IMAGE_PUSH := never
5+
# Setup the activated commit hooks (default: pre-commit [pre-commit, commit-msg]).
6+
GITHOOKS := pre-commit commit-msg
17
# Setup code quality level (default: base).
28
CODE_QUALITY := plus
39

@@ -12,17 +18,8 @@ CODACY_API_BASE_URL := https://api.codacy.com
1218
#TEST_DEPS := run-db
1319
# Setup required targets before running commands (default: <empty>).
1420
#RUN_DEPS := run-db
15-
# Setup required aws services for testing (default: <empty>).
16-
#AWS_SERVICES :=
17-
18-
# Setup when to push images (default: pulls [never, pulls, merges])
19-
IMAGE_PUSH ?= never
20-
21-
# Setup default test timeout (default: 10s).
22-
TEST_TIMEOUT := 12s
23-
24-
# Setup custom delivery file (default: delivery.yaml).
25-
FILE_DELIVERY := .github/workflows/go.yaml
21+
# Setup required aws services for testing (comma separated, default: <empty>).
22+
#AWS_SERVICES := sqs,s3
2623

2724
# Custom linters applied to prepare next level (default: <empty>).
2825
LINTERS_CUSTOM := nonamedreturns gochecknoinits tagliatelle

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,23 @@ versions for changes.
238238

239239
## Building
240240

241-
This project is using [go-make][go-make] for building, which provides default
242-
implementations for most common tasks. Read the [go-make manual][go-make-man]
243-
for more information about how to build, test, lint, etc.
241+
This project is using [go-make][go-make], which provides default targets for
242+
most common tasks, to initialize, build, test, and run the software of this
243+
project. Read the [go-make manual][go-make-man] for more information about
244+
targets and configuration options.
245+
246+
**Not:** [go-make][go-make] automatically installs `pre-commit` and `commit-msg`
247+
[hooks][git-hooks] overwriting and deleting pre-existing hooks (see also
248+
[Customizing Git - Git Hooks][git-hooks]). The `pre-commit` hook calls
249+
`make commit` as an alias for executing `test-go`, `test-unit`, `lint-<level>`,
250+
and `lint-markdown` to enforce successful testing and linting. The `commit-msg`
251+
hook calls `make git-verify message` for validating whether the commit message
252+
is following the [conventional commit][convent-commit] best practice.
244253

245254
[go-make]: <https://github.com/tkrop/go-make>
246255
[go-make-man]: <https://github.com/tkrop/go-make/blob/main/MANUAL.md>
256+
[git-hooks]: <https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks>
257+
[convent-commit]: <https://www.conventionalcommits.org/en/v1.0.0/>
247258

248259

249260
## Contributing

go.mod

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
module github.com/tkrop/go-testing
22

3-
go 1.21
4-
5-
toolchain go1.21.6
3+
go 1.22.0
64

75
require (
86
github.com/golang/mock v1.6.0
97
github.com/h2non/gock v1.2.0
108
github.com/huandu/go-clone v1.6.0
119
github.com/stretchr/testify v1.8.4
12-
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a
10+
golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3
1311
golang.org/x/text v0.13.0
1412
golang.org/x/tools v0.17.0
1513
)
@@ -19,7 +17,7 @@ require (
1917
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 // indirect
2018
github.com/kr/pretty v0.3.1 // indirect
2119
github.com/pmezard/go-difflib v1.0.0 // indirect
22-
golang.org/x/mod v0.14.0 // indirect
20+
golang.org/x/mod v0.15.0 // indirect
2321
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
2422
gopkg.in/yaml.v3 v3.0.1 // indirect
2523
)

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl
3333
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
3434
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
3535
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
36-
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a h1:Q8/wZp0KX97QFTc2ywcOE0YRjZPVIx+MXInMzdvQqcA=
37-
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08=
36+
golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo=
37+
golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08=
3838
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
39-
golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
40-
golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
39+
golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8=
40+
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
4141
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
4242
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
4343
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=

0 commit comments

Comments
 (0)