Skip to content

DNM: Retool how validators register and are called #15

DNM: Retool how validators register and are called

DNM: Retool how validators register and are called #15

name: validation-gen CI Tests
on:
pull_request:
branches:
- "validation-gen"
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
- name: Run go mod tidy and check for diffs
run: |
go mod tidy
git diff --exit-code
- name: Run code generation and check for diffs
run: |
hack/update-codegen.sh validation
git diff --exit-code
- name: Run validation-gen go tests and also check for diffs with generated test fixture code
env:
UPDATE_VALIDATION_GEN_FIXTURE_DATA: "true"
run: |
go test ./staging/src/k8s.io/code-generator/cmd/validation-gen/...
go test ./staging/src/k8s.io/apimachinery/pkg/api/...
go test ./staging/src/k8s.io/apimachinery/pkg/util/...
git diff --exit-code