Skip to content

Add Go CI

Add Go CI #1

Workflow file for this run

name: Go
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
test:
permissions:
contents: read # for actions/checkout to fetch code
name: Unit Tests & Code Quality
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- name: Check out code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: go fmt
working-directory: src/k8s
run: make go.fmt
- name: go vet
working-directory: src/k8s
run: make go.vet
- name: go test
working-directory: src/k8s
run: make test-unit