-
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.
... and fix linter errors.
- Loading branch information
Showing
27 changed files
with
364 additions
and
197 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 |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: ci | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: lib/go/iinft | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.16.*' | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- id: go-cache-paths | ||
run: | | ||
echo "::set-output name=go-build::$(go env GOCACHE)" | ||
echo "::set-output name=go-mod::$(go env GOMODCACHE)" | ||
- name: Go Build Cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.go-cache-paths.outputs.go-build }} | ||
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} | ||
|
||
- name: Go Mod Cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.go-cache-paths.outputs.go-mod }} | ||
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} | ||
|
||
- name: golangci-lint | ||
uses: golangci/[email protected] | ||
with: | ||
args: "--out-${NO_FUTURE}format colored-line-number --timeout 5m" | ||
working-directory: lib/go/iinft | ||
skip-pkg-cache: true | ||
skip-build-cache: true | ||
|
||
tidy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.16.*' | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- uses: zencargo/github-action-go-mod-tidy@v1 | ||
with: | ||
path: lib/go/iinft | ||
go-version: 1.16 | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.16.*' | ||
- name: Set up Cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Test | ||
run: make test | ||
|
||
|
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 |
---|---|---|
|
@@ -28,4 +28,4 @@ _references | |
lib/go/iinft/bin | ||
|
||
# Flow emulator | ||
flowdb | ||
flowdb |
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,64 @@ | ||
linters-settings: | ||
errcheck: | ||
check-type-assertions: true | ||
goconst: | ||
min-len: 2 | ||
min-occurrences: 3 | ||
gocritic: | ||
enabled-tags: | ||
- diagnostic | ||
- experimental | ||
- opinionated | ||
- performance | ||
- style | ||
govet: | ||
check-shadowing: true | ||
nolintlint: | ||
require-explanation: true | ||
require-specific: true | ||
funlen: | ||
lines: 100 | ||
statements: 40 | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- asciicheck | ||
- bodyclose | ||
- contextcheck | ||
- depguard | ||
- dogsled | ||
# - dupl | ||
- errcheck | ||
- errorlint | ||
- exportloopref | ||
- exhaustive | ||
- goconst | ||
# - gocritic | ||
- gofmt | ||
- goimports | ||
# - gomnd | ||
- gocyclo | ||
- gosec | ||
- gosimple | ||
- govet | ||
- importas | ||
- ineffassign | ||
- misspell | ||
- nolintlint | ||
- nakedret | ||
- prealloc | ||
- predeclared | ||
- revive | ||
- staticcheck | ||
- stylecheck | ||
- thelper | ||
- typecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
- wastedassign | ||
|
||
run: | ||
issues-exit-code: 1 | ||
|
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 +1,6 @@ | ||
# sequel-flow-contracts | ||
Flow smart contracts for Sequel | ||
[](https://github.com/piprate/sequel-flow-contracts/actions/workflows/ci.yml) | ||
|
||
# Flow contracts for Sequel | ||
|
||
* Flow contracts for Sequel | ||
* Supporting Go framework |
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
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.