Merge pull request #39 from RainbowMango/pr_bump_k8s_128 #97
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Workflow | |
on: | |
# Run this workflow every time a new commit pushed to upstream/fork repository. | |
# Run workflow on fork repository will help contributors find and resolve issues before sending a PR. | |
push: | |
pull_request: | |
defaults: | |
run: | |
working-directory: go/src/sigs.k8s.io/work-api | |
jobs: | |
golangci: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v3 | |
- uses: actions/checkout@v3 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
# the version of golangci-lint. | |
version: v1.58.0 | |
# show only new issues if it's a pull request. | |
only-new-issues: false | |
args: --timeout 3m0s | |
verify: | |
name: verify | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
path: go/src/sigs.k8s.io/work-api | |
- name: install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.21.x | |
- name: verify | |
run: hack/verify-all.sh -v | |
env: | |
GOPATH: '/home/runner/work/work-api/work-api/go' | |
test: | |
name: unit test | |
needs: verify | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
path: go/src/sigs.k8s.io/work-api | |
- name: install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.21.x | |
- name: make test | |
run: make test | |
env: | |
GOPATH: '/home/runner/work/work-api/work-api/go' | |
e2e: | |
name: e2e | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
path: go/src/sigs.k8s.io/work-api | |
- name: install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.21.x | |
- name: images | |
run: make docker-build | |
env: | |
GOPATH: '/home/runner/work/work-api/work-api/go' | |
- name: setup kind | |
uses: engineerd/[email protected] | |
with: | |
version: v0.11.1 | |
- name: Load image on the nodes of the cluster | |
run: | | |
kind load docker-image --name=kind work-api-controller:latest | |
- name: Run e2e test | |
run: | | |
make test-e2e | |
env: | |
KUBECONFIG: /home/runner/.kube/config |