forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add basic CI testing against PRs via new Github Action
- Loading branch information
1 parent
9ab35ed
commit a949784
Showing
5 changed files
with
43 additions
and
170 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,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 | ||
env: | ||
UPDATE_VALIDATION_GEN_FIXTURE_DATA: "true" | ||
run: | | ||
go test ./staging/src/k8s.io/code-generator/cmd/validation-gen/... | ||
git diff --exit-code | ||
Oops, something went wrong.