Skip to content

chore: update reviewdog/action-golangci-lint action to v2.8.0 #141

chore: update reviewdog/action-golangci-lint action to v2.8.0

chore: update reviewdog/action-golangci-lint action to v2.8.0 #141

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
lint-code:
name: Run Linters
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: Review code
uses: reviewdog/action-golangci-lint@f9bba13753278f6a73b27a56a3ffb1bfda90ed71 # v2.8.0
with:
go_version: 1.22.5
golangci_lint_version: v1.59.1
reporter: github-pr-review
fail_on_error: true
check-licenses:
name: Check Licenses
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: 1.22.5
- name: Get google/go-licenses package
run: go install github.com/google/[email protected]
- name: Check the licenses
run: |
go-licenses check --disallowed_types=forbidden,restricted,reciprocal,permissive,unknown .
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: 1.22.5
- name: Execute tests
run: |
go test -v -gcflags=all=-l -cover ./... -coverprofile coverage.out -coverpkg ./...
- name: Upload code coverage report
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
with:
files: coverage.out
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}