Skip to content

Bump actions/checkout from 5 to 6 #1712

Bump actions/checkout from 5 to 6

Bump actions/checkout from 5 to 6 #1712

Workflow file for this run

on:
pull_request:
paths-ignore:
- "**/*.md'"
- "doc/*.{json,png,svg}"
push:
paths-ignore:
- "**/*.md'"
- "doc/*.{json,png,svg}"
name: Test
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Run Revive Action by building from repository
uses: morphy2k/[email protected]
with:
exclude: "./vendor/..."
name: "Revive"
- name: Install kubebuilder tools
run: ./hack/install-kubebuilder-tools.sh
- name: Generate code
run: ./hack/generate-code.sh && hack/verify-codegen.sh
- name: Run go fmt
run: go fmt ./...
#run: diff -u <(echo -n) <(gofmt -d -s .)
- name: Run go vet
run: go vet --tags=test $(go list ./... | grep -v /e2e)
- name: Install static check
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Test
run: sudo PATH=${PATH}:./bin ./hack/test-go.sh
- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.out
flag-name: Go-${{ matrix.go }}
env:
KUBEBUILDER_ASSETS: "$(pwd)/bin"
e2e-test:
name: e2e test
runs-on: ubuntu-latest
env:
NUMBER_OF_COMPUTE_NODES: 5
steps:
- name: Checkout code into the Go module directory
uses: actions/checkout@v6
- name: Set up Go version
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Install requirements
run: sudo apt-get install nmap jq && ./hack/build-go.sh
- name: Get tools, setup KinD cluster test environment
run: source hack/e2e-get-test-tools.sh && ./hack/e2e-setup-kind-cluster.sh --number-of-compute $NUMBER_OF_COMPUTE_NODES
- name: Clear test-cache
run: go clean -testcache
- name: Execute golang based E2E tests (excluding node_slice)
env:
KUBECONFIG: /home/runner/.kube/config
NUMBER_OF_THRASH_ITER: 20
FILL_PERCENT_CAPACITY: 20
run: pushd e2e; go test -v $(go list ./... | grep -v /e2e_node_slice) -timeout 1h; popd
e2e-test-node_slice:
name: e2e test (node_slice)
runs-on: ubuntu-latest
env:
NUMBER_OF_COMPUTE_NODES: 5
steps:
- name: Checkout code into the Go module directory
uses: actions/checkout@v6
- name: Set up Go version
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Install requirements
run: sudo apt-get install nmap jq && ./hack/build-go.sh
- name: Get tools, setup KinD cluster test environment
run: source hack/e2e-get-test-tools.sh && ./hack/e2e-setup-kind-cluster.sh --number-of-compute $NUMBER_OF_COMPUTE_NODES
- name: Clear test-cache
run: go clean -testcache
- name: Execute golang based E2E tests (only node_slice)
env:
KUBECONFIG: /home/runner/.kube/config
NUMBER_OF_THRASH_ITER: 20
FILL_PERCENT_CAPACITY: 20
run: pushd e2e; go test -v ./e2e_node_slice/... -timeout 1h; popd