Code Analysis #365
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: "Code Analysis" | |
on: | |
push: | |
tags: | |
- v* | |
branches: | |
- main | |
pull_request: | |
schedule: | |
- cron: "0 0 * * 0" | |
concurrency: | |
group: ${{ format('{0}-{1}', github.workflow, github.head_ref) }} | |
cancel-in-progress: true | |
env: | |
GO: "1.23" | |
permissions: read-all | |
jobs: | |
UnitTests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] # immutable action, safe to use a version instead of hashtag | |
- name: Install Go | |
uses: actions/[email protected] # immutable action, safe to use a version instead of hashtag | |
with: | |
go-version: ${{ env.GO }} | |
- name: Run Unit Tests | |
run: go test -race -cover -coverprofile=coverage.out -covermode=atomic | |
- name: Codecov | |
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
GolangCI-Lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] # immutable action, safe to use a version instead of hashtag | |
- name: Install Go | |
uses: actions/[email protected] # immutable action, safe to use a version instead of hashtag | |
with: | |
go-version: ${{ env.GO }} | |
- name: Run GolangCi-Lint | |
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1 | |
with: | |
version: latest |