Skip to content

feat(ci): fix CodeQL findings #38

feat(ci): fix CodeQL findings

feat(ci): fix CodeQL findings #38

Workflow file for this run

name: Go
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
strategy:
matrix:
go: ["1.22", "1.23"]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: ${{ matrix.go }}
- name: Build
run: go build ./...
- name: Test
run: go test ./...
codecov:
name: codecov
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.22
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: "1.22"
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Generate coverage report
run: |
go test ./... -coverprofile=coverage.txt -covermode=atomic
- name: Upload coverage report
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage.txt
flags: unittests
name: codecov