Skip to content

NOSImage validation script #135

NOSImage validation script

NOSImage validation script #135

Workflow file for this run

name: NOSImage validation script
on:
push:
branches: [ main ]
pull_request:
schedule:
- cron: "49 0 * * *"
jobs:
integration-test:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: stable
cache: false
- name: Generate Examples and Check No Diff
run: |
cd tools/nosimage
go generate ./example
git diff --exit-code --ignore-all-space --ignore-blank-lines
- name: Validate Good Example
run: |
cd tools/nosimage
go run validate/validate.go -file example/valid_example_nosimageprofile.textproto; rm -rf tmp
- name: Validate Bad Example
run: |
cd tools/nosimage
for file in example/invalid-*.textproto; do
if go run validate/validate.go -file "$file"; then
echo "Validation passed for $file, but failure expected"
exit 1
fi
done
rm -rf tmp