forked from kcl-lang/kcl
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: peefy <[email protected]>
- Loading branch information
Showing
3 changed files
with
33 additions
and
0 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,32 @@ | ||
name: validate schemas with KCL | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'directory/with/yaml/files/config**' | ||
|
||
env: | ||
KCL_VERSION: 0.9.0 | ||
|
||
jobs: | ||
validate: | ||
name: validate with KCL | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
name: checkout code | ||
with: | ||
fetch-depth: 2 | ||
- name: install kcl | ||
run: wget -q https://kcl-lang.io/script/install-cli.sh -O - | /bin/bash -s $KCL_VERSION | ||
- name: show kcl version | ||
shell: bash -ieo pipefail {0} | ||
run: kcl version | ||
- name: validate modified files | ||
shell: bash -ieo pipefail {0} | ||
run: | | ||
iterations=10 | ||
for ((i=1; i<=$iterations; i++)); do | ||
echo "Executing kcl vet for the $i-th time..." | ||
kcl vet a.yaml schema.k --format yaml | ||
done |
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 @@ | ||
a : 1 |