This repository has been archived by the owner on Apr 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: switch ci and update linter (#4)
- Loading branch information
Showing
9 changed files
with
102 additions
and
35 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,7 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: gomod | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 |
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,49 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
name: run tests | ||
jobs: | ||
test: | ||
|
||
strategy: | ||
matrix: | ||
go-version: [ 1.15, 1.16 ] | ||
runs-on: ubuntu-latest | ||
env: | ||
GOLANGCI_LINT_VERSION: v1.41.1 | ||
|
||
steps: | ||
- name: Install Go | ||
if: success() | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache Go modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Run linter | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
version: ${{ env.GOLANGCI_LINT_VERSION }} | ||
|
||
- name: Run tests | ||
run: go test -covermode=count -coverprofile=coverage.out ./... | ||
|
||
- name: Convert coverage.out to coverage.lcov | ||
uses: jandelgado/gcov2lcov-action@v1.0.6 | ||
- name: Coveralls | ||
uses: coverallsapp/github-action@v1.1.2 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: coverage.lcov |
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,38 @@ | ||
run: | ||
tests: false | ||
timeout: 5m | ||
|
||
linters-settings: | ||
cyclop: | ||
max-complexity: 20 | ||
skip-tests: true | ||
gofumpt: | ||
extra-rules: true | ||
|
||
linters: | ||
enable-all: true | ||
disable: | ||
- interfacer # deprecated | ||
- scopelint # deprecated | ||
- maligned # deprecated | ||
- golint # deprecated | ||
- dupl | ||
- exhaustive | ||
- exhaustivestruct | ||
- forcetypeassert | ||
- funlen | ||
- gochecknoglobals | ||
- gochecknoinits | ||
- goerr113 | ||
- gomnd | ||
- lll | ||
- nlreturn | ||
- wrapcheck | ||
- wsl | ||
|
||
issues: | ||
exclude-use-default: false | ||
exclude-rules: | ||
- path: ptr.go | ||
linters: | ||
- gosec |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// Package slices implements fast slice operations. | ||
package slices |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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