Skip to content

Commit

Permalink
feat: update deps (#73)
Browse files Browse the repository at this point in the history
Signed-off-by: Tronje Krop <[email protected]>
  • Loading branch information
tkrop committed Feb 20, 2024
1 parent e1315e8 commit fe50bb5
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21
go-version: 1.22.0

- name: Build and tests
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21
go-version: 1.22.0

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

- name: Publish new version
env:
GH_TOKEN: ${{ github.token }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: make --trace publish || true
run: make --trace version-publish || true
19 changes: 6 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,16 @@ else
$(warning warning: please customize variables in Makefile.vars)
endif

# Setup desired go compiler environemt or defaults.
# Setup default go compiler environment.
export GO ?= go
ifndef GOSETUP
export GOBIN ?= $(shell $(GO) env GOPATH)/bin
else ifeq ($(GOSETUP),local)
export GOBIN := $(DIR_BUILD)/bin
export PATH := $(GOBIN):$(PATH)
else
$(error error: unsupported go setup ($(GOSETUP)))
endif

export GOPATH ?= $(shell $(GO) env GOPATH)
export GOBIN ?= $(GOPATH)/bin
# Setup go-make to utilize desired build and config scripts.
GOMAKE_DEP ?= github.com/tkrop/[email protected].43
GOMAKE_DEP ?= github.com/tkrop/[email protected].58
# Request targets from go-make targets target.
TARGETS := $(shell command -v $(GOBIN)/go-make >/dev/null || \
go install $(GOMAKE_DEP) >/dev/stderr && \
$(GOBIN)/go-make targets 2>/dev/null)
$(GO) install $(GOMAKE_DEP) >/dev/stderr && \
$(GOBIN)/go-make show-targets 2>/dev/null)
# Declare all targets phony to make them available for auto-completion.
.PHONY:: $(TARGETS)

Expand Down
19 changes: 8 additions & 11 deletions Makefile.vars
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Setup default test timeout (default: 10s).
TEST_TIMEOUT := 12s
# Setup when to push images (default: pulls [never, pulls, merges])
IMAGE_PUSH := never
# Setup the activated commit hooks (default: pre-commit [pre-commit, commit-msg]).
GITHOOKS := pre-commit commit-msg
# Setup code quality level (default: base).
CODE_QUALITY := plus

Expand All @@ -12,17 +18,8 @@ CODACY_API_BASE_URL := https://api.codacy.com
#TEST_DEPS := run-db
# Setup required targets before running commands (default: <empty>).
#RUN_DEPS := run-db
# Setup required aws services for testing (default: <empty>).
#AWS_SERVICES :=

# Setup when to push images (default: pulls [never, pulls, merges])
IMAGE_PUSH ?= never

# Setup default test timeout (default: 10s).
TEST_TIMEOUT := 12s

# Setup custom delivery file (default: delivery.yaml).
FILE_DELIVERY := .github/workflows/go.yaml
# Setup required aws services for testing (comma separated, default: <empty>).
#AWS_SERVICES := sqs,s3

# Custom linters applied to prepare next level (default: <empty>).
LINTERS_CUSTOM := nonamedreturns gochecknoinits tagliatelle
Expand Down
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,23 @@ versions for changes.

## Building

This project is using [go-make][go-make] for building, which provides default
implementations for most common tasks. Read the [go-make manual][go-make-man]
for more information about how to build, test, lint, etc.
This project is using [go-make][go-make], which provides default targets for
most common tasks, to initialize, build, test, and run the software of this
project. Read the [go-make manual][go-make-man] for more information about
targets and configuration options.

**Not:** [go-make][go-make] automatically installs `pre-commit` and `commit-msg`
[hooks][git-hooks] overwriting and deleting pre-existing hooks (see also
[Customizing Git - Git Hooks][git-hooks]). The `pre-commit` hook calls
`make commit` as an alias for executing `test-go`, `test-unit`, `lint-<level>`,
and `lint-markdown` to enforce successful testing and linting. The `commit-msg`
hook calls `make git-verify message` for validating whether the commit message
is following the [conventional commit][convent-commit] best practice.

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


## Contributing
Expand Down
8 changes: 3 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
module github.com/tkrop/go-testing

go 1.21

toolchain go1.21.6
go 1.22.0

require (
github.com/golang/mock v1.6.0
github.com/h2non/gock v1.2.0
github.com/huandu/go-clone v1.6.0
github.com/stretchr/testify v1.8.4
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a
golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3
golang.org/x/text v0.13.0
golang.org/x/tools v0.17.0
)
Expand All @@ -19,7 +17,7 @@ require (
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/mod v0.15.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a h1:Q8/wZp0KX97QFTc2ywcOE0YRjZPVIx+MXInMzdvQqcA=
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08=
golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo=
golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8=
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
Expand Down

0 comments on commit fe50bb5

Please sign in to comment.