Skip to content

Commit

Permalink
test: add basic CI testing against t PRs via new Github Action
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-prindle committed Jan 6, 2025
1 parent 482b49c commit 75eb768
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 165 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/validation-gen-ci-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
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
with:
go-version: "^1.20"

- 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/...
git diff --exit-code
Loading

0 comments on commit 75eb768

Please sign in to comment.