-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2. Updating dependency versions 3. Expanded documentation 4. Added linters 5. Removed asdf support
- Loading branch information
Showing
13 changed files
with
217 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Matrix tests | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
test-matrix: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
go: ["1.22.x", "stable"] | ||
continueOnError: [false] | ||
# include: | ||
# - go: ">=1.23.0-rc.1" | ||
# continueOnError: true | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
check-latest: true | ||
|
||
- run: make go-all-tests | ||
|
||
- name: Test Summary | ||
uses: test-summary/action@v2 | ||
with: | ||
paths: "junit-report.xml" | ||
if: always() | ||
|
||
- name: Upload test results to Codecov | ||
if: ${{ !cancelled() }} | ||
uses: codecov/test-results-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: "junit-report.xml" | ||
verbose: true | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ./coverage-unit.out | ||
verbose: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,24 @@ | ||
go-dependencies: | ||
# https://asdf-vm.com/ | ||
asdf install golang || : | ||
go-all: go-update go-generate go-all-tests | ||
go-all-tests: go-lint go-unit-tests | ||
|
||
# https://github.com/securego/gosec | ||
go install github.com/securego/gosec/v2/cmd/gosec@latest | ||
go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@latest | ||
# | ||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest | ||
go install github.com/nunnatsa/ginkgolinter/cmd/ginkgolinter@latest | ||
go-dependencies: | ||
$(eval GOBIN=$(shell go env GOPATH 2>/dev/null)/bin) | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) latest | ||
# | ||
go install github.com/onsi/ginkgo/v2/ginkgo@latest | ||
# | ||
go install github.com/vektra/mockery/v2@latest | ||
# | ||
asdf reshim golang || : | ||
# | ||
go get -u -t -v ./... || : | ||
|
||
go-generate: go-dependencies | ||
#mockery | ||
go-update: go-dependencies | ||
go mod tidy && go get -t -v -u ./... | ||
|
||
go-generate: | ||
go generate ./... | ||
|
||
go-lint: go-dependencies | ||
go-lint: | ||
golangci-lint run | ||
ginkgolinter ./... | ||
go vet -vettool=$$(go env GOPATH)/bin/shadow ./... | ||
|
||
go-test: go-lint | ||
gosec ./... | ||
ginkgo -r -race --cover --coverprofile=.coverage-ginkgo.out --junit-report=junit-report.xml ./... | ||
go tool cover -func=.coverage-ginkgo.out -o=.coverage.out | ||
cat .coverage.out | ||
|
||
go-all-tests: go-dependencies go-generate go-lint go-test | ||
go-unit-tests: | ||
ginkgo -race --cover --coverprofile="ginkgo-coverage-unit.out" --junit-report="junit-report.xml" ./... | ||
go tool cover -func "ginkgo-coverage-unit.out" -o "coverage-unit.out" | ||
go tool cover -html "ginkgo-coverage-unit.out" -o "coverage-unit.html" | ||
|
||
go-all: go-all-tests | ||
go mod tidy || : | ||
cat coverage-unit.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
module github.com/itbasis/go-hashtag | ||
|
||
go 1.21 | ||
go 1.22 | ||
|
||
require ( | ||
github.com/onsi/ginkgo/v2 v2.15.0 | ||
github.com/onsi/gomega v1.31.1 | ||
github.com/itbasis/go-test-utils/v4 v4.0.0 | ||
github.com/onsi/ginkgo/v2 v2.20.0 | ||
github.com/onsi/gomega v1.34.1 | ||
) | ||
|
||
require ( | ||
github.com/go-logr/logr v1.4.1 // indirect | ||
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect | ||
github.com/dusted-go/logging v1.3.0 // indirect | ||
github.com/go-logr/logr v1.4.2 // indirect | ||
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect | ||
github.com/google/go-cmp v0.6.0 // indirect | ||
github.com/google/pprof v0.0.0-20240125082051-42cd04596328 // indirect | ||
github.com/kr/pretty v0.3.1 // indirect | ||
github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 // indirect | ||
github.com/kr/text v0.2.0 // indirect | ||
github.com/rogpeppe/go-internal v1.11.0 // indirect | ||
github.com/stretchr/testify v1.8.4 // indirect | ||
golang.org/x/net v0.20.0 // indirect | ||
golang.org/x/sys v0.16.0 // indirect | ||
golang.org/x/text v0.14.0 // indirect | ||
golang.org/x/tools v0.17.0 // indirect | ||
google.golang.org/protobuf v1.31.0 // indirect | ||
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa // indirect | ||
golang.org/x/net v0.28.0 // indirect | ||
golang.org/x/sys v0.24.0 // indirect | ||
golang.org/x/text v0.17.0 // indirect | ||
golang.org/x/tools v0.24.0 // indirect | ||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
) |
Oops, something went wrong.