diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 344699f8d..10a25c1a5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,6 +11,14 @@ on: env: DEBIAN_FRONTEND: noninteractive jobs: + lint: + strategy: + matrix: + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - uses: golangci/golangci-lint-action@v3 test: strategy: matrix: @@ -39,6 +47,14 @@ jobs: path-to-profile: .profile.cov parallel: true flag-name: Go-${{ matrix.os }}-${{ matrix.go }} + finish: + needs: [test] + runs-on: ubuntu-latest + steps: + - uses: shogo82148/actions-goveralls@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel-finished: true build: needs: [test] runs-on: ubuntu-latest diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 000000000..b6f9f2846 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,22 @@ +linters: + # Detected a number of cases that could not be handled after the switchover, + # TODO remove this rule. + disable: + - gosimple + - errcheck + - ineffassign +linters-settings: + govet: +# enable-all: true + disable: + # Detected a number of cases that could not be handled after the switchover, + # TODO remove this rule. +issues: + exclude-rules: + - path: _test\.go + linters: + - errcheck + - gosimple + - staticcheck + - ineffassign +