Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: peefy <[email protected]>
  • Loading branch information
Peefy committed Jul 18, 2024
1 parent 3a583ca commit 001dddd
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/a.yaml
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
1 change: 1 addition & 0 deletions a.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a : 1
Empty file added schema.k
Empty file.

0 comments on commit 001dddd

Please sign in to comment.