-
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 #2 from drand/new/wip
Migration from the drand v1.5 codebase to its own repo
- Loading branch information
Showing
62 changed files
with
9,251 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Lint | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
|
||
concurrency: | ||
group: ci-${{ github.ref }}-lint | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.22' | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v4 | ||
with: | ||
version: v1.58 | ||
args: --timeout 5m |
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,30 @@ | ||
name: "Build/Tests" | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
|
||
concurrency: | ||
group: ci-${{ github.ref }}-tests | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
continue-on-error: true | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.22' | ||
- name: Unit tests | ||
env: | ||
DRAND_TEST_LOGS: "${{ runner.debug == '1' && 'DEBUG' || 'INFO' }}" | ||
CI: "true" | ||
run: go test -v ./... |
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,198 @@ | ||
issues: | ||
# Let us display all issues of one type at once | ||
max-same-issues: 0 | ||
# Excluding configuration per-path, per-linter, per-text and per-source | ||
exclude-rules: | ||
- path: _test\.go | ||
linters: | ||
- bodyclose | ||
- cyclop | ||
- errcheck | ||
- forbidigo | ||
- goconst | ||
- gocyclo | ||
- mnd | ||
- gosec | ||
- nilnil | ||
- noctx | ||
- revive | ||
- depguard | ||
- lll # signatures are long lines | ||
- path: _test\.go | ||
text: "SA1019" # we still want to test deprecated functions | ||
- path: cmd | ||
linters: | ||
- forbidigo # we use Println in our UX | ||
- path: internal/lib | ||
linters: | ||
- forbidigo # we use Println in our UX | ||
- path: internal/drand-cli | ||
linters: | ||
- forbidigo # we use Println in our UX | ||
- goconst # we re-use some strings in our flags | ||
- path: client/http | ||
text: "unexported-return" | ||
run: | ||
skip-dirs: | ||
- demo | ||
- test | ||
|
||
linters: | ||
enable: | ||
- asasalint | ||
- asciicheck | ||
- bidichk | ||
- bodyclose | ||
#- containedctx #TODO could be enabled | ||
#- contextcheck #TODO could be enabled | ||
#- cyclop | ||
#- deadcode # Deprecated | ||
- decorder | ||
# - depguard | ||
- dogsled | ||
- dupl | ||
- dupword | ||
- durationcheck | ||
- errcheck | ||
- errchkjson | ||
- errname | ||
- errorlint | ||
# - execinquery # deprecated | ||
- exhaustive | ||
# - exhaustivestruct | ||
# - exhaustruct | ||
- exportloopref | ||
# - forbidigo | ||
# - forcetypeassert #TODO could be enabled | ||
- funlen | ||
# - gci | ||
# - gochecknoglobals | ||
- gochecknoinits | ||
# - gocognit | ||
- goconst | ||
- gocritic | ||
- gocyclo | ||
# - godot | ||
# - godox #TODO could be enabled | ||
# - goerr113 | ||
- gofmt | ||
# - gofumpt | ||
- goheader | ||
- goimports | ||
# - golint # Deprecated | ||
# - gomnd # deprecated, replaced by mnd | ||
# - gomoddirectives | ||
- gomodguard | ||
- goprintffuncname | ||
- gosec | ||
- gosimple | ||
- govet | ||
- grouper | ||
# - ifshort | ||
- importas | ||
- ineffassign | ||
- interfacebloat | ||
# - interfacer # Deprecated | ||
# - ireturn | ||
- lll | ||
- loggercheck | ||
- maintidx | ||
- makezero | ||
# - maligned #Deprecated | ||
#- mnd | ||
- misspell | ||
- nakedret | ||
# - nestif | ||
- nilerr | ||
- nilnil | ||
# - nlreturn | ||
- noctx | ||
- nolintlint | ||
# - nonamedreturns | ||
# - nosnakecase | ||
- nosprintfhostport | ||
# - paralleltest #TODO could be enabled | ||
- prealloc | ||
- predeclared | ||
# - promlinter #TODO could be enabled | ||
- reassign | ||
- revive | ||
- rowserrcheck | ||
# - scopelint # Deprecated | ||
- sqlclosecheck | ||
- staticcheck | ||
# - structcheck # Deprecated | ||
- stylecheck | ||
# - tagliatelle | ||
- tenv | ||
- testableexamples | ||
# - testpackage | ||
# - thelper #TODO could be enabled | ||
- tparallel | ||
- typecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
- usestdlibvars | ||
# - varcheck # Deprecated | ||
# - varnamelen | ||
- wastedassign | ||
- whitespace | ||
# - wrapcheck | ||
# - wsl | ||
|
||
linters-settings: | ||
dupl: | ||
threshold: 100 | ||
exhaustive: | ||
default-signifies-exhaustive: false | ||
funlen: | ||
lines: 100 | ||
statements: 50 | ||
goconst: | ||
min-len: 3 | ||
min-occurrences: 3 | ||
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: 15 | ||
goimports: | ||
local-prefixes: github.com/drand | ||
golint: | ||
min-confidence: 0 | ||
mnd: | ||
# don't include the "operation" and "assign" | ||
checks: | ||
- argument | ||
- case | ||
- condition | ||
- return | ||
lll: | ||
line-length: 140 | ||
# maligned: # Deprecated | ||
# suggest-new: true | ||
# govet: | ||
# check-shadowing: true #TODO could be enabled | ||
# enable: | ||
# - fieldalignment #TODO could be enabled | ||
revive: | ||
enable: | ||
- var-naming | ||
misspell: | ||
locale: US | ||
nolintlint: | ||
allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space) | ||
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 |
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,2 @@ | ||
drand-relay-gossip: | ||
go build -o drand-relay-gossip ./gossip-relay/main.go |
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
Oops, something went wrong.