Skip to content

feat(initializer): validate initializer Pod uses correct volume name #8222

feat(initializer): validate initializer Pod uses correct volume name

feat(initializer): validate initializer Pod uses correct volume name #8222

Workflow file for this run

# Copyright The Kubeflow Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Unit and Integration Test - Go
on:
- push
- pull_request
jobs:
generate:
name: Generate
runs-on: ubuntu-latest
if: ${{ github.repository == 'kubeflow/trainer' }}
env:
GOPATH: ${{ github.workspace }}/go
defaults:
run:
working-directory: ${{ env.GOPATH }}/src/github.com/kubeflow/trainer
steps:
- name: Checkout code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
path: ${{ env.GOPATH }}/src/github.com/kubeflow/trainer
- name: Setup Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version-file: ${{ env.GOPATH }}/src/github.com/kubeflow/trainer/go.mod
- name: Check Go modules
run: |
go mod tidy
git diff --exit-code || (echo 'Please run "go mod tidy" to sync Go modules' && exit 1);
- name: Check auto-generated assets
run: |
make generate
git diff --exit-code || (echo 'Please run "make generate" to generate assets' && exit 1);
- name: Check go fmt
run: |
make fmt
git diff --exit-code || (echo 'Please run "make fmt" to verify gofmt' && exit 1);
- name: Check go vet
run: |
make vet
git diff --exit-code || (echo 'Please run "make vet" to verify govet' && exit 1);
- name: Check golangci lint
run: |
make golangci-lint
test:
name: Test
runs-on: ubuntu-latest
if: ${{ github.repository == 'kubeflow/trainer' }}
env:
GOPATH: ${{ github.workspace }}/go
defaults:
run:
working-directory: ${{ env.GOPATH }}/src/github.com/kubeflow/trainer
steps:
- name: Checkout code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
path: ${{ env.GOPATH }}/src/github.com/kubeflow/trainer
- name: Setup Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version-file: ${{ env.GOPATH }}/src/github.com/kubeflow/trainer/go.mod
- name: Run Go unit tests
run: |
make test
- name: Run Go integration tests
run: |
make test-integration
- name: Coveralls report
uses: shogo82148/actions-goveralls@9606dbc5ac5cf888a0e9ef901515c3cd516a2790 # v1
continue-on-error: true
with:
path-to-profile: cover.out
working-directory: ${{ env.GOPATH }}/src/github.com/kubeflow/trainer