-
Notifications
You must be signed in to change notification settings - Fork 7
39 lines (39 loc) · 1.49 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: build/test
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.19.6
uses: actions/setup-go@v1
with:
go-version: 1.19.6
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get dependencies, run go test & install
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
make test SHELL='bash -x'
make install SHELL='bash -x'
export PATH="$(go env GOPATH)/bin:$PATH"
kube-role-gen -help
- name: Setup kind
uses: engineerd/[email protected]
with:
version: "v0.12.0"
image: kindest/node:v1.23.4@sha256:0e34f0d0fd448aa2f2819cfd74e99fe5793a6e4938b328f657c8e3f81ee0dfb9
- name: Run Kubernetes tests
run: |
LATEST_VERSION=$(wget -O - "https://api.github.com/repos/open-policy-agent/conftest/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | cut -c 2-)
wget "https://github.com/open-policy-agent/conftest/releases/download/v${LATEST_VERSION}/conftest_${LATEST_VERSION}_Linux_x86_64.tar.gz"
tar xzf conftest_${LATEST_VERSION}_Linux_x86_64.tar.gz
sudo mv conftest /usr/local/bin
go install github.com/yannh/kubeconform/cmd/kubeconform@latest
kubectl cluster-info
export PATH="$(go env GOPATH)/bin:$PATH"
make e2e