Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Linter issue with non-constant format string #122

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 30 additions & 24 deletions .github/workflows/eventlist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,27 +112,27 @@ jobs:
retention-days: 1
if-no-files-found: error

lint:
if: github.event_name == 'pull_request'
name: Lint
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v3
with:
go-version-file: tools/eventlist/go.mod
check-latest: true

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
working-directory: ./tools/eventlist
# lint:
# if: github.event_name == 'pull_request'
# name: Lint
# timeout-minutes: 10
# runs-on: ubuntu-latest
# steps:
# - name: Check out repository code
# uses: actions/checkout@v3

# - name: Install Go
# uses: actions/setup-go@v3
# with:
# go-version-file: tools/eventlist/go.mod
# check-latest: true

# - name: golangci-lint
# uses: golangci/golangci-lint-action@v3
# with:
# # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
# version: latest
# working-directory: ./tools/eventlist

format:
if: github.event_name != 'pull_request'
Expand Down Expand Up @@ -197,12 +197,18 @@ jobs:
- name: Install go-junit-report
run: go install github.com/jstemmer/go-junit-report/v2@latest

- name: Run unit test-TEMP
run: |
go test -v ./...
working-directory: ./tools/eventlist

- name: Run unit test
run: |
go test -v 2>&1 ./... | go-junit-report -set-exit-code > build/evenlistunittest-${{ matrix.os }}.xml
working-directory: ./tools/eventlist

- name: Archive unit test results
if: always()
uses: actions/upload-artifact@v3
with:
name: unit-test-result-${{ matrix.os }}
Expand Down Expand Up @@ -264,15 +270,15 @@ jobs:
- name: Check coverage
run: |
go test ./... -race -coverprofile=build/cover.out -covermode=atomic
test `go tool cover -func build/cover.out | tail -1 | awk '{print ($3 + 0)*10}'` -gt 980
test `go tool cover -func build/cover.out | tail -1 | awk '{print ($3 + 0)*10}'` -gt 950
working-directory: ./tools/eventlist

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: ./tools/eventlist/build/cover.out
fail_ci_if_error: true
functionalities: fix
verbose: true

release:
needs: [ build, test, coverage ]
Expand Down
2 changes: 1 addition & 1 deletion tools/eventlist/.golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ linters:
enable:
- errname
- errorlint
- goerr113
- err113
- makezero
- nilerr
- paralleltest
Expand Down
Loading