forked from k8snetworkplumbingwg/whereabouts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request k8snetworkplumbingwg#119 from andreaskaris/upstrea…
…m-sync-2023-03-22 Upstream sync 2023 03 29
- Loading branch information
Showing
161 changed files
with
4,983 additions
and
1,754 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,7 @@ jobs: | |
test: | ||
strategy: | ||
matrix: | ||
#go-version: [1.15.x, 1.16.x] | ||
go-version: [1.17.x] | ||
go-version: [1.19.x] | ||
os: [ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
|
@@ -17,49 +16,55 @@ jobs: | |
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Get all changed files excluding docs and README | ||
id: changed-files | ||
uses: tj-actions/changed-files@v35 | ||
with: | ||
files_ignore: | | ||
**/*.md | ||
doc/*.{json,png,svg} | ||
- name: Run Revive Action by building from repository | ||
uses: morphy2k/[email protected] | ||
uses: morphy2k/[email protected] | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
with: | ||
exclude: "./vendor/..." | ||
name: "Revive" | ||
|
||
- name: Install kubebuilder tools | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: ./hack/install-kubebuilder-tools.sh | ||
|
||
- name: Generate code | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: ./hack/generate-code.sh && hack/verify-codegen.sh | ||
|
||
- name: Run go fmt | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: go fmt ./... | ||
#run: diff -u <(echo -n) <(gofmt -d -s .) | ||
|
||
- name: Run go vet | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: go vet --tags=test ./... | ||
|
||
- name: Install static check | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: go install honnef.co/go/tools/cmd/staticcheck@latest | ||
|
||
- name: Test | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: sudo PATH=${PATH}:./bin ./hack/test-go.sh | ||
|
||
- name: Send coverage | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
uses: shogo82148/actions-goveralls@v1 | ||
with: | ||
path-to-profile: coverage.out | ||
flag-name: Go-${{ matrix.go }} | ||
parallel: true | ||
env: | ||
KUBEBUILDER_ASSETS: "$(pwd)/bin" | ||
|
||
# notifies that all test jobs are finished. | ||
finish: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: shogo82148/actions-goveralls@v1 | ||
with: | ||
parallel-finished: true | ||
|
||
e2e-test: | ||
name: e2e test | ||
runs-on: ubuntu-latest | ||
|
@@ -69,21 +74,33 @@ jobs: | |
- name: Set up Go version | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.17 | ||
go-version: 1.19.x | ||
|
||
- name: Checkout code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Get all changed files excluding docs and README | ||
id: changed-files | ||
uses: tj-actions/changed-files@v35 | ||
with: | ||
files_ignore: | | ||
**/*.md | ||
doc/*.{json,png,svg} | ||
- name: Install requirements | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: sudo apt-get install nmap jq && ./hack/build-go.sh | ||
|
||
- name: Get tools, setup KinD cluster test environment | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
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 | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: go clean -testcache | ||
|
||
- name: Execute golang based E2E tests | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
env: | ||
KUBECONFIG: /home/runner/.kube/config | ||
NUMBER_OF_THRASH_ITER: 20 | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM golang:1.17 | ||
FROM golang:1.19 | ||
ADD . /usr/src/whereabouts | ||
|
||
ENV GOARCH "arm64" | ||
|
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
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
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
Oops, something went wrong.