-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI to run the tests for Go. (#1031)
Signed-off-by: Syulin7 <[email protected]>
- Loading branch information
Showing
4 changed files
with
55 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Thanks for sending a pull request! Here are some tips for you: | ||
1. If this is your first time, check our contributor guidelines: https://www.kubeflow.org/docs/about/contributing | ||
2. To know more about Arena, check the developer guide: | ||
https://arena-docs.readthedocs.io/en/latest/ | ||
3. If you want *faster* PR reviews, check how: https://git.k8s.io/community/contributors/guide/pull-requests.md#best-practices-for-faster-reviews | ||
--> | ||
|
||
**What this PR does / why we need it**: | ||
|
||
**Which issue(s) this PR fixes** _(optional, in `Fixes #<issue number>, #<issue number>, ...` format, will close the issue(s) when PR gets merged)_: | ||
Fixes # |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Go generate Test | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
env: | ||
GOPATH: ${{ github.workspace }}/go | ||
defaults: | ||
run: | ||
working-directory: ${{ env.GOPATH }}/src/github.com/kubeflow/arena | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
with: | ||
path: ${{ env.GOPATH }}/src/github.com/kubeflow/arena | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version-file: ${{ env.GOPATH }}/src/github.com/kubeflow/arena/go.mod | ||
|
||
- name: Check Go modules | ||
run: | | ||
go mod tidy && git add go.* && | ||
git diff --cached --exit-code || (echo 'Please run "go mod tidy" to sync Go modules' && exit 1); | ||
- name: Verify gofmt | ||
run: | | ||
make fmt && git add pkg cmd && | ||
git diff --cached --exit-code || (echo 'Please run "make fmt" to verify gofmt' && exit 1); | ||
- name: Verify govet | ||
run: | | ||
make vet && git add pkg cmd && | ||
git diff --cached --exit-code || (echo 'Please run "make vet" to verify govet' && exit 1); | ||
- name: Verify golint | ||
run: | | ||
make golangci-lint |
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 was deleted.
Oops, something went wrong.