Skip to content

Commit e6625ba

Browse files
committed
ci: validate examples
1 parent a376dc7 commit e6625ba

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

.github/workflows/test.yaml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,28 @@ jobs:
1010
name: "Run Integration Test Example"
1111
runs-on: "ubuntu-latest"
1212
steps:
13-
- uses: "actions/checkout@v3"
14-
- uses: "actions/setup-go@v3"
15-
with:
16-
go-version: "~1.19.1"
13+
- uses: "actions/checkout@v6"
14+
- uses: "actions/setup-go@v6"
1715
- uses: "authzed/actions/go-test@main"
1816
with:
1917
working_directory: "integration-testing"
18+
validate-example-schemas:
19+
name: "Validate Example Schemas"
20+
runs-on: "ubuntu-latest"
21+
steps:
22+
- uses: "actions/checkout@v6"
23+
- name: "Install zed and run validate"
24+
run: |
25+
curl -L https://github.com/authzed/zed/releases/latest/download/zed-linux-amd64 -o zed
26+
chmod +x zed
27+
for schema_file in $(find schemas -name "schema-and-data.yaml" -type f); do
28+
schema_dir=$(dirname "$schema_file")
29+
echo "Validating $schema_file..."
30+
if ! zed validate "$schema_file"; then
31+
echo "Validation failed for $schema_file"
32+
exit_code=1
33+
else
34+
echo "Validation passed for $schema_file"
35+
fi
36+
done
37+
exit $exit_code

0 commit comments

Comments
 (0)