Skip to content

build(deps): bump github/codeql-action from 3.24.3 to 3.24.4 #64

build(deps): bump github/codeql-action from 3.24.3 to 3.24.4

build(deps): bump github/codeql-action from 3.24.3 to 3.24.4 #64

Workflow file for this run

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Go CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.21.x]
os: [windows-2019, windows-2022, ubuntu-22.04, ubuntu-20.04]
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- name: Install Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.0.0
- name: Install Test Converter and run tests
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: |
export GOPATH="$HOME/go/"
export PATH=$PATH:$GOPATH/bin
go install github.com/jstemmer/go-junit-report/v2@latest
go test -covermode=atomic -coverprofile=coverage.out -race -v ./... > test_output.txt 2>&1 || true
cat test_output.txt
cat test_output.txt | go-junit-report -set-exit-code > junit.xml
if grep -q "FAIL" test_output.txt; then exit 1; fi
- name: Format
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
if: ${{ matrix.os == 'ubuntu-20.04' }}
- name: Run go vet
run: go vet ./...
if: ${{ matrix.os == 'ubuntu-20.04' }}
- name: Run go lint
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0
if: ${{ matrix.os == 'ubuntu-20.04' }}
with:
version: latest
- name: build go
run: go build ./cmd/main.go
- name: Go Fuzz
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: go test ./cmd -fuzz=FuzzMe -fuzztime=15s
- uses: codecov/codecov-action@e0b68c6749509c5f83f984dd99a76a1c1a231044 # v4.0.1
if: ${{ matrix.os == 'ubuntu-20.04' }}
name: Upload Coverage Results
- name: GitHub Upload Release Artifacts
if: ${{ matrix.os == 'ubuntu-20.04' }}
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: JUnit Results
path: junit.xml