chore: update github/codeql-action action to v3.28.0 #103
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: 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@dd3fda91790ca90e75049e5c767509dc0ec7d99b # v2.7.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@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | |
with: | |
go-version: 1.22.5 | |
- name: Get google/go-licenses package | |
run: go install github.com/google/go-licenses@v1.6.0 | |
- 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@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.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@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1 | |
with: | |
files: coverage.out | |
verbose: true | |
token: ${{ secrets.CODECOV_TOKEN }} |