refactor: update to latest linter #126
Workflow file for this 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
--- | |
name: Lint and test | |
on: [push] | |
concurrency: | |
group: pr-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
golangci: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout codebase | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Run GolangCI-Lint Scanner | |
uses: golangci/golangci-lint-action@v4 | |
with: | |
# Required: the version of golangci-lint is required and must be specified without patch version. | |
version: v1.56 | |
# Optional: golangci-lint command line arguments. | |
# This contains hack to print out file path | |
# See https://github.com/golangci/golangci-lint-action/issues/119#issuecomment-981090648 | |
args: --out-${NO_FUTURE}format colored-line-number --timeout 2m00s | |
test: | |
name: Test and coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Run Unit tests. | |
run: make test | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.out | |
# Notify us when failed, so devs are not waiting for Codecov report when it will never come. | |
# Because Codecov report is required to be able to merge, we have to run again the whole test anyway. | |
fail_ci_if_error: true |