-
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.
Merge pull request #3 from aserto-dev/makefile
rm mage, add makefile
- Loading branch information
Showing
14 changed files
with
359 additions
and
681 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,8 @@ on: | |
|
||
env: | ||
VAULT_ADDR: https://vault.eng.aserto.com/ | ||
GO_VERSION: "1.20" | ||
GO_LANGCI_LINT_VERSION: "v1.53.3" | ||
GO_VERSION: "1.23" | ||
GO_LANGCI_LINT_VERSION: "v1.61.0" | ||
CONSOLE_VERSION: ${{ inputs.version }} | ||
|
||
jobs: | ||
|
@@ -24,21 +24,19 @@ jobs: | |
uses: actions/checkout@v4 | ||
- | ||
name: Setup Go | ||
uses: actions/setup-go@v4 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- | ||
name: Read Configuration | ||
uses: hashicorp/vault-action@v2.5.0 | ||
uses: hashicorp/vault-action@v3 | ||
id: vault | ||
with: | ||
url: https://vault.eng.aserto.com/ | ||
token: ${{ secrets.VAULT_TOKEN }} | ||
secrets: | | ||
kv/data/github "SSH_PRIVATE_KEY" | SSH_PRIVATE_KEY; | ||
kv/data/github "READ_WRITE_TOKEN" | READ_WRITE_TOKEN; | ||
- | ||
name: Setup git | ||
run: | | ||
|
@@ -48,15 +46,13 @@ jobs: | |
git config --global url."[email protected]:".insteadOf https://github.com/ | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Aserto Bot" | ||
- | ||
name: Update static files | ||
run: | | ||
go run mage.go fetch | ||
make fetch | ||
- | ||
name: Push updated console | ||
run: | | ||
git add . | ||
git commit -m "update console static files" | ||
git push | ||
git push |
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,3 +1,4 @@ | ||
/go.work.sum | ||
/cover.out | ||
.ext/* | ||
.dev/* |
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,157 @@ | ||
--- | ||
# golangci.com configuration | ||
# https://github.com/golangci/golangci/wiki/Configuration | ||
|
||
run: | ||
timeout: 5m | ||
|
||
linters-settings: | ||
depguard: | ||
list-type: blacklist | ||
packages: | ||
# logging is allowed only by zerolog | ||
- github.com/sirupsen/logrus | ||
packages-with-error-message: | ||
- github.com/sirupsen/logrus: "logging is allowed only by zerolog" | ||
dupl: | ||
threshold: 100 | ||
funlen: | ||
lines: 100 | ||
statements: 80 | ||
goconst: | ||
min-len: 2 | ||
min-occurrences: 2 | ||
gocritic: | ||
enabled-tags: | ||
- diagnostic | ||
- experimental | ||
- opinionated | ||
- performance | ||
- style | ||
disabled-checks: | ||
- dupImport # https://github.com/go-critic/go-critic/issues/845 | ||
- ifElseChain | ||
- octalLiteral | ||
- whyNoLint | ||
- wrapperFunc | ||
gocyclo: | ||
min-complexity: 18 | ||
goimports: | ||
local-prefixes: github.com/golangci/golangci-lint | ||
golint: | ||
min-confidence: 0 | ||
gomnd: | ||
checks: | ||
- argument | ||
- case | ||
- condition | ||
- return | ||
ignored-numbers: | ||
ignored-files: | ||
ignored-functions: | ||
govet: | ||
shadow: true | ||
settings: | ||
printf: | ||
funcs: | ||
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof | ||
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf | ||
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf | ||
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf | ||
maligned: | ||
suggest-new: true | ||
misspell: | ||
locale: US | ||
nolintlint: | ||
allow-unused: false # report any unused nolint directives | ||
require-explanation: false # don't require an explanation for nolint directives | ||
require-specific: false # don't require nolint directives to be specific about which linter is being skipped | ||
|
||
linters: | ||
# please, do not use `enable-all`: it's deprecated and will be removed soon. | ||
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint | ||
disable-all: true | ||
enable: | ||
- asciicheck | ||
- bodyclose | ||
- copyloopvar | ||
- dogsled | ||
- errcheck | ||
- exhaustive | ||
- funlen | ||
- gochecknoinits | ||
- goconst | ||
- gocritic | ||
- gocyclo | ||
- godot | ||
# - goerr113 # temporary disabled | ||
- gofmt | ||
- goimports | ||
- goprintffuncname | ||
- gosec | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- misspell | ||
- nakedret | ||
- noctx | ||
# - rowserrcheck # disable https://github.com/golangci/golangci-lint/issues/2649. | ||
- staticcheck | ||
- stylecheck | ||
- testpackage | ||
- typecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
|
||
# don't enable: | ||
# - depguard | ||
# - dupl | ||
# - gochecknoglobals | ||
# - gocognit | ||
# - godox | ||
# - gomnd | ||
# - lll | ||
# - nestif | ||
# - nolintlint # conflict with 1.19 gofmt changes | ||
# - prealloc | ||
# - revive | ||
# - wsl | ||
# - whitespace | ||
|
||
issues: | ||
# List of regexps of issue texts to exclude, empty list by default. | ||
# But independently from this option we use default exclude patterns, | ||
# it can be disabled by `exclude-use-default: false`. To list all | ||
# excluded by default patterns execute `golangci-lint run --help` | ||
exclude: | ||
- declaration of "(err|ctx)" shadows declaration at | ||
- shadow of imported from 'github.com/stretchr/testify/assert' package 'assert' | ||
# Excluding configuration per-path, per-linter, per-text and per-source | ||
exclude-rules: | ||
- path: _test\.go | ||
linters: | ||
- gomnd | ||
# https://github.com/go-critic/go-critic/issues/926 | ||
- text: "unnecessaryDefer:" | ||
linters: | ||
- gocritic | ||
- text: "unnamedResult:" | ||
linters: | ||
- gocritic | ||
- path: \.resolvers\.go | ||
text: "typeDefFirst:" | ||
linters: | ||
- gocritic | ||
- path: \.resolvers\.go | ||
text: "paramTypeCombine:" | ||
linters: | ||
- gocritic | ||
- path: \.resolvers\.go | ||
text: "hugeParam:" | ||
linters: | ||
- gocritic | ||
- text: "G404" | ||
linters: | ||
- gosec | ||
|
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,5 +1,3 @@ | ||
module github.com/aserto-dev/go-topaz-ui | ||
|
||
go 1.20 | ||
|
||
require github.com/magefile/mage v1.15.0 | ||
go 1.22 |
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,2 +0,0 @@ | ||
github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg= | ||
github.com/magefile/mage v1.15.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= | ||
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.