Skip to content

Code Analysis

Code Analysis #285

Workflow file for this run

name: "Code Analysis"
on:
push:
tags:
- v*
branches:
- main
pull_request:
schedule:
- cron: "0 0 * * 0"
env:
GO: 1.17
jobs:
CodeQL:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: go
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
UnitTests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO }}
- name: Run Unit Tests
run: go test -race -cover -coverprofile=coverage.out -covermode=atomic
- name: Codecov
uses: codecov/[email protected]
with:
file: ./coverage.out
GolangCI-Lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO }}
- name: Run GolangCi-Lint
uses: golangci/[email protected]
with:
version: latest