-
-
Notifications
You must be signed in to change notification settings - Fork 512
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/go_modules/modules/compose/github…
….com/docker/compose/v2-2.24.0 * main: pin Docker images version (#2129) enable golangci-lint for examples (#2128) chore(deps): bump github.com/neo4j/neo4j-go-driver/v5 in /modules/neo4j (#2098) enable golangci-lint for redis module (#2126) Go install gotestsum and golangci-lint (#2127) improve OSSF score (#2125)
- Loading branch information
Showing
16 changed files
with
79 additions
and
53 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
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 |
---|---|---|
|
@@ -13,7 +13,7 @@ jobs: | |
timeout-minutes: 30 | ||
steps: | ||
- name: Create pending status | ||
uses: actions/[email protected] | ||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
|
@@ -27,7 +27,7 @@ jobs: | |
}) | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }} | ||
|
@@ -50,12 +50,10 @@ jobs: | |
|
||
- name: go test | ||
timeout-minutes: 30 | ||
run: | | ||
go install gotest.tools/gotestsum@latest | ||
gotestsum --format short-verbose --rerun-fails=5 --packages="./..." --junitfile TEST-unit.xml -- -timeout=30m | ||
run: make test-unit | ||
|
||
- name: Create success status | ||
uses: actions/[email protected] | ||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | ||
if: success() | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
|
@@ -70,7 +68,7 @@ jobs: | |
}) | ||
- name: Create failure status | ||
uses: actions/[email protected] | ||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | ||
if: failure() | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
|
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 |
---|---|---|
|
@@ -20,6 +20,9 @@ on: | |
schedule: | ||
- cron: '40 6 * * 5' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
|
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,16 +1,35 @@ | ||
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) | ||
GOBIN= $(GOPATH)/bin | ||
|
||
define go_install | ||
go install $(1) | ||
endef | ||
|
||
$(GOBIN)/golangci-lint: | ||
$(call go_install,github.com/golangci/golangci-lint/cmd/[email protected]) | ||
|
||
$(GOBIN)/gotestsum: | ||
$(call go_install,gotest.tools/gotestsum@latest) | ||
|
||
.PHONY: install | ||
install: $(GOBIN)/golangci-lint $(GOBIN)/gotestsum | ||
|
||
.PHONY: clean | ||
clean: | ||
rm $(GOBIN)/golangci-lint | ||
rm $(GOBIN)/gotestsum | ||
|
||
.PHONY: dependencies-scan | ||
dependencies-scan: | ||
@echo ">> Scanning dependencies in $(CURDIR)..." | ||
go list -json -m all | docker run --rm -i sonatypecommunity/nancy:latest sleuth --skip-update-check | ||
|
||
.PHONY: lint | ||
lint: | ||
lint: $(GOBIN)/golangci-lint | ||
golangci-lint run --out-format=github-actions --path-prefix=. --verbose -c $(ROOT_DIR)/.golangci.yml --fix | ||
|
||
.PHONY: test-% | ||
test-%: | ||
test-%: $(GOBIN)/gotestsum | ||
@echo "Running $* tests..." | ||
gotestsum \ | ||
--format short-verbose \ | ||
|
@@ -26,8 +45,7 @@ tools: | |
go mod download | ||
|
||
.PHONY: test-tools | ||
test-tools: | ||
go install gotest.tools/gotestsum@latest | ||
test-tools: $(GOBIN)/gotestsum | ||
|
||
.PHONY: tools-tidy | ||
tools-tidy: | ||
|
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 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 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 +1 @@ | ||
FROM docker.io/redis:5.0-alpine | ||
FROM docker.io/redis:5.0-alpine@sha256:1a3c609295332f1ce603948142a132656c92a08149d7096e203058533c415b8c |
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 +1 @@ | ||
FROM docker.io/redis:5.0-alpine | ||
FROM docker.io/redis:5.0-alpine@sha256:1a3c609295332f1ce603948142a132656c92a08149d7096e203058533c415b8c |
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