-
Notifications
You must be signed in to change notification settings - Fork 8
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 #68 from hermitkim1/release-cb-network-0.0.2
Release cb-network-0.0.2
- Loading branch information
Showing
24 changed files
with
1,765 additions
and
675 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,57 @@ | ||
# The name of your workflow. GitHub displays the names of your workflows on your repository's actions page. | ||
# If you omit name, GitHub sets it to the workflow file path relative to the root of the repository. | ||
name: build-on-pull-request | ||
|
||
# This workflow is triggered on pull request | ||
on: | ||
pull_request: | ||
branches: [ $default-branch, develop ] | ||
paths-ignore: | ||
- '**.md' | ||
- '.gitignore' | ||
- 'LICENSE' | ||
|
||
jobs: | ||
# Set the job key. The key is displayed as the job name | ||
# when a job name is not provided | ||
# The job key is “build" | ||
build: | ||
# Job name is “Build” | ||
name: Build | ||
|
||
strategy: | ||
matrix: | ||
go-version: [ 1.15.x ] | ||
os: [ ubuntu-18.04 ] #macos-latest, windows-latest | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
# This action sets up a go environment for use in actions by: | ||
# optionally downloading and caching a version of Go by version and adding to PATH | ||
# registering problem matchers for error output | ||
# This step uses GitHub's setup-go: https://github.com/actions/setup-go | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
id: go | ||
|
||
# This action checks-out your repository under $GITHUB_WORKSPACE, so your workflow can access it. | ||
# This step uses GitHub's checkout: https://github.com/actions/checkout | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
# This step installs dependencies | ||
# - name: Get dependencies | ||
# run: | | ||
# go get -v -t -d ./... | ||
# if [ -f Gopkg.toml ]; then | ||
# curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh | ||
# dep ensure | ||
# fi | ||
|
||
# This step builds source codes | ||
- name: Build | ||
run: | | ||
go build -v ./poc-cb-net/cmd/agent | ||
go build -v ./poc-cb-net/cmd/server |
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 |
---|---|---|
|
@@ -3,6 +3,11 @@ | |
name: lint-on-push | ||
|
||
# This workflow is triggered on push | ||
on: | ||
push: | ||
branches: | ||
- '**' | ||
paths-ignore: | ||
on: | ||
push: | ||
# Ignoring branches | ||
|
@@ -16,6 +21,9 @@ on: | |
paths-ignore: | ||
# Push events to poc-cb-net/archive/** | ||
- 'poc-cb-net/archive/**' | ||
- '**.md' | ||
- '.gitignore' | ||
- 'LICENSE' | ||
|
||
jobs: | ||
# Set the job key. The key is displayed as the job name | ||
|
@@ -27,26 +35,16 @@ jobs: | |
|
||
strategy: | ||
matrix: | ||
go-version: [1.15.x] | ||
os: [ubuntu-18.04] #macos-latest, windows-latest | ||
go-version: [ 1.15.x ] | ||
os: [ ubuntu-18.04 ] #macos-latest, windows-latest | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. | ||
version: v1.29 | ||
|
||
# Add args to skip dirs | ||
args: --skip-dirs poc-cb-net/archive | ||
|
||
# Optional: working directory, useful for monorepos | ||
# working-directory: somedir | ||
- name: Checkout source code | ||
uses: actions/checkout@v2 | ||
|
||
# Optional: golangci-lint command line arguments. | ||
# args: --issues-exit-code=0 | ||
- name: Install golangci-lint | ||
run: go get github.com/golangci/golangci-lint/cmd/[email protected] | ||
|
||
# Optional: show only new issues if it's a pull request. The default value is `false`. | ||
# only-new-issues: true | ||
- name: Run golangci-lint | ||
run: golangci-lint run |
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,4 +1,5 @@ | ||
.idea/ | ||
*.exe | ||
poc-cb-net/cmd/agent/agent | ||
poc-cb-net/cmd/server/server | ||
poc-cb-net/cmd/server/server | ||
poc-cb-net/configs/ |
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,150 @@ | ||
linters-settings: | ||
depguard: | ||
list-type: blacklist | ||
packages: | ||
# An example | ||
# - github.com/sirupsen/logrus | ||
packages-with-error-message: | ||
# An example | ||
# - github.com/sirupsen/logrus: "logging is allowed only by logutils.Log" | ||
dupl: | ||
threshold: 100 | ||
funlen: | ||
lines: 100 | ||
statements: 50 | ||
gci: | ||
local-prefixes: github.com/golangci/golangci-lint | ||
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: 15 | ||
goimports: | ||
local-prefixes: github.com/golangci/golangci-lint | ||
golint: | ||
min-confidence: 0.8 | ||
gomnd: | ||
settings: | ||
mnd: | ||
# don't include the "operation" and "assign" | ||
checks: argument,case,condition,return | ||
govet: | ||
check-shadowing: 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 | ||
lll: | ||
line-length: 140 | ||
maligned: | ||
suggest-new: true | ||
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 | ||
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: | ||
# - bodyclose | ||
# - deadcode | ||
# - depguard | ||
# - dogsled | ||
# - dupl | ||
# - errcheck | ||
# - exhaustive | ||
# - funlen | ||
# - gochecknoinits | ||
# - goconst | ||
# - gocritic | ||
- gocyclo | ||
- gofmt | ||
# - goimports | ||
- golint | ||
# - gomnd | ||
# - goprintffuncname | ||
# - gosec | ||
# - gosimple | ||
- govet | ||
- ineffassign | ||
# - interfacer | ||
# - lll | ||
- misspell | ||
# - nakedret | ||
# - noctx | ||
# - nolintlint | ||
# - rowserrcheck | ||
# - scopelint | ||
# - staticcheck | ||
# - structcheck | ||
# - stylecheck | ||
# - typecheck | ||
# - unconvert | ||
# - unparam | ||
# - unused | ||
# - varcheck | ||
# - whitespace | ||
# don't enable: | ||
# - asciicheck | ||
# - gochecknoglobals | ||
# - gocognit | ||
# - godot | ||
# - godox | ||
# - goerr113 | ||
# - maligned | ||
# - nestif | ||
# - prealloc | ||
# - testpackage | ||
# - wsl | ||
issues: | ||
exclude-use-default: false | ||
exclude: | ||
- EXC0002 | ||
# 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 | ||
- linters: | ||
- gocritic | ||
text: "unnecessaryDefer:" | ||
# TODO temporary rule, must be removed | ||
# seems related to v0.34.1, but I was not able to reproduce locally, | ||
# I was also not able to reproduce in the CI of a fork, | ||
# only the golangci-lint CI seems to be affected by this invalid analysis. | ||
- path: pkg/golinters/scopelint.go | ||
text: 'directive `//nolint:interfacer` is unused for linter interfacer' | ||
run: | ||
skip-dirs: | ||
- archive | ||
- test/testdata_etc | ||
- internal/cache | ||
- internal/renameio | ||
- internal/robustio | ||
# golangci.com configuration | ||
# https://github.com/golangci/golangci/wiki/Configuration | ||
service: | ||
golangci-lint-version: 1.35.x # use the fixed version to not introduce new linters unexpectedly | ||
prepare: | ||
- echo "here I can run custom commands, but no preparation needed for this repo" |
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.