Skip to content

Merge pull request #984 from buildtool/dependabot/go_modules/k8s-f41b… #2236

Merge pull request #984 from buildtool/dependabot/go_modules/k8s-f41b…

Merge pull request #984 from buildtool/dependabot/go_modules/k8s-f41b… #2236

Workflow file for this run

name: Go
on:
push:
branches: [ main ]
paths-ignore:
- 'www/**'
- '*.md'
- '.editorconfig'
- 'LICENSE'
- 'install.sh'
pull_request:
branches: [ main ]
paths-ignore:
- 'www/**'
- '*.md'
- '.editorconfig'
- 'LICENSE'
- 'install.sh'
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: 'true'
- name: Test
run: |
go fmt $(go list ./...)
go vet $(go list ./...)
unset "${!GITHUB_@}" RUNNER_WORKSPACE
CGO_ENABLED=1 go test -p 1 -mod=readonly -race -coverprofile=coverage.txt -covermode=atomic -coverpkg=$(go list ./... | tr '\n' , | sed 's/,$//') ./...
go tool cover -func=coverage.txt
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.txt
flags: unittests
fail_ci_if_error: true
verbose: true