Skip to content

fix openshift release script #1607

fix openshift release script

fix openshift release script #1607

Workflow file for this run

name: Precommit - Unit Tests
on:
pull_request:
branches:
- '*'
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- 'PROJECT'
- 'LICENSE'
- 'mesh-worker-service/README.md'
- 'tools/README.md'
jobs:
build:
name: unit-tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: [1.18, 1.19, 1.20.4]
steps:
- name: clean disk
run: |
sudo swapoff -a
sudo rm -rf /swapfile /usr/share/dotnet /usr/local/lib/android /opt/ghc
sudo apt clean
docker rmi $(docker images -q) -f
df -h
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: InstallKubebuilder
run: |
curl -L -o kubebuilder "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v3.6.0/kubebuilder_linux_amd64"
chmod +x kubebuilder && mv kubebuilder /usr/local/bin/
- name: InstallTool
run: |
wget -O - -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.52.2
./bin/golangci-lint --version
- name: validate controller-gen
run: |
make manager
- name: BuildProject
run: |
go mod download
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go
- name: CheckStyle
run: |
./bin/golangci-lint run -c ./.golangci.yml ./...
- name: Check License Header
run: |
go test license_test.go
- name: Get vertical-pod-autoscaler crd
run: |
wget https://raw.githubusercontent.com/kubernetes/autoscaler/master/vertical-pod-autoscaler/deploy/vpa-v1-crd-gen.yaml -O config/crd/bases/vpa-v1-crd.yaml
- name: Run unit test check
run: make test
- name: Run envtest for controller
run: make test-ginkgo