-
Notifications
You must be signed in to change notification settings - Fork 700
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: tenzen-y <yuki.iwai.tz@gmail.com>
- Loading branch information
Showing
5 changed files
with
68 additions
and
112 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,54 @@ | ||
name: Go 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/training-operator | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
with: | ||
path: ${{ env.GOPATH }}/src/github.com/kubeflow/training-operator | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.14 | ||
|
||
- 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" && exit1); | ||
- name: Check manifests | ||
run: | | ||
make manifests && git add manifests/base/crds | ||
git diff --cached --exit-code || (echo "Please run "make manifests" to generate manifests" && exit1); | ||
- name: Check auto-generated codes | ||
run: | | ||
make generate && git add pkg/apis | ||
git diff --cached --exit-code || (echo "Please run "make generate" to generate Go codes" && exit1); | ||
- name: Verify gofmt | ||
run: | | ||
make fmt && git add pkg cmd | ||
git diff --cached --exit-code || (echo "Please run "make fmt" to verify gofmt" && exit1); | ||
- name: Verify govet | ||
run: | | ||
make vet && git add pkg cmd | ||
git diff --cached --exit-code || (echo "Please run "make vet" to verify govet" && exit1); | ||
- name: Run Go test | ||
run: make test | ||
- name: Coveralls report | ||
uses: shogo82148/actions-goveralls@v1 | ||
with: | ||
path-to-profile: coverage.out | ||
working-directory: ${{ env.GOPATH }}/src/github.com/kubeflow/training-operator |
This file was deleted.
Oops, something went wrong.
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.