This repository has been archived by the owner on Sep 12, 2023. It is now read-only.
fix job active count; count terminating pod as failed (#214) #176
Workflow file for this run
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
on: [push, pull_request] | |
name: Build | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
GOPATH: ${{ github.workspace }} | |
GO111MODULE: on | |
defaults: | |
run: | |
working-directory: ${{ env.GOPATH }}/src/github.com/kubeflow/common | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
path: ${{ env.GOPATH }}/src/github.com/kubeflow/common | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: ${{ env.GOPATH }}/src/github.com/kubeflow/common/go.mod | |
- uses: actions/cache@v3 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Build | |
run: | | |
./hack/verify-gomod.sh | |
./hack/verify-codegen.sh | |
go build ./... | |
go fmt ./... | |
- name: Install dependencies | |
run: | | |
# get coveralls.io support | |
go install github.com/mattn/goveralls@latest | |
# Install golangci-lint | |
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin | |
- name: Test | |
run: | | |
golangci-lint run --config=linter_config.yaml ./... | |
# Here we run all tests in pkg and we have to use `-ignore` | |
# since goveralls uses `filepath.Match` to match ignore files | |
# and it does not support patterns like `**`. | |
goveralls -service=github -v -package ./... -ignore "test_job/client/*/*.go,test_job/client/*/*/*.go,test_job/client/*/*/*/*.go,test_job/client/*/*/*/*/*.go,test_job/client/*/*/*/*/*/*.go,test_job/client/*/*/*/*/*/*/*.go,test_job/testutil/*.go,test_job/*/*/*/zz_generated.*.go,test_job/*/*/*/*_generated.go,pkg/apis/common/*/zz_generated.*.go,pkg/apis/common/*/*_generated.go" || echo "push to coveralls failed" |