Skip to content

chore: bump github/codeql-action/analyze from 4.36.3 to 4.37.3 #1819

chore: bump github/codeql-action/analyze from 4.36.3 to 4.37.3

chore: bump github/codeql-action/analyze from 4.36.3 to 4.37.3 #1819

Workflow file for this run

name: test
on:
push:
paths-ignore:
- "**.md"
pull_request:
paths-ignore:
- "**.md"
permissions:
contents: read
jobs:
lint:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
name: "Lint"
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Harden Runner
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit
- name: Set up Go 1.26
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v3.5.0
with:
go-version: "1.26"
- name: Check out code into the Go module directory
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Lint
uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
with:
version: v2.12.2
args: --timeout 5m
test:
name: "Unit test"
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Harden Runner
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit
- name: Set up Go 1.26
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: "1.26"
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install kubebuilder
run: |
curl -L -O "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v${KUBEBUILDER_VERSION}/kubebuilder_$(go env GOOS)_$(go env GOARCH)" && \
curl -L -O "https://dl.k8s.io/v${KUBERNETES_VERSION}/kubernetes-server-$(go env GOOS)-$(go env GOARCH).tar.gz" && \
curl -L -O "https://dl.k8s.io/v${KUBERNETES_VERSION}/kubernetes-client-$(go env GOOS)-$(go env GOARCH).tar.gz" && \
curl -L -O "https://github.com/etcd-io/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-$(go env GOOS)-$(go env GOARCH).tar.gz" && \
tar -zxvf kubernetes-server-$(go env GOOS)-$(go env GOARCH).tar.gz && \
tar -zxvf kubernetes-client-$(go env GOOS)-$(go env GOARCH).tar.gz && \
tar -zxvf etcd-v${ETCD_VERSION}-$(go env GOOS)-$(go env GOARCH).tar.gz && \
chmod +x kubebuilder_$(go env GOOS)_$(go env GOARCH) && \
chmod +x kubernetes/server/bin/kube-apiserver && \
chmod +x kubernetes/client/bin/kubectl && \
chmod +x etcd-v${ETCD_VERSION}-$(go env GOOS)-$(go env GOARCH)/etcd && \
sudo mkdir -p /usr/local/kubebuilder/bin && \
sudo mv kubebuilder_$(go env GOOS)_$(go env GOARCH) /usr/local/kubebuilder/bin/kubebuilder && \
sudo mv kubernetes/server/bin/kube-apiserver /usr/local/kubebuilder/bin/kube-apiserver && \
sudo mv kubernetes/server/bin/kubectl /usr/local/kubebuilder/bin/kubectl && \
sudo mv etcd-v${ETCD_VERSION}-$(go env GOOS)-$(go env GOARCH)/etcd /usr/local/kubebuilder/bin/etcd
env:
KUBEBUILDER_VERSION: 3.9.0
KUBERNETES_VERSION: 1.26.1
ETCD_VERSION: 3.5.7
- name: Unit test
run: make test
- name: Codecov Upload
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
flags: unittests
files: ./cover.out
fail_ci_if_error: false