forked from cppstat/cppstat
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.52 KB
/
verify-data.yml
File metadata and controls
51 lines (44 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: "Verify data"
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
yamllint:
name: "YAML lint"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "YAML lint"
uses: karancode/yamllint-github-action@master
with:
yamllint_file_or_dir: "*.yaml"
yamllint_strict: false
yamllint_comment: false
- name: "Install dependencies"
run: sudo apt-get update && sudo apt-get install -y g++-14 libyaml-cpp-dev nlohmann-json3-dev
- name: "Fetch json-schema-validator"
run: |
rm -rf json-schema-validator
git clone --depth 1 https://github.com/pboettch/json-schema-validator.git json-schema-validator
- name: "Build YAML validator"
run: |
g++-14 -std=c++23 -Wall -Wextra \
$(pkg-config --cflags yaml-cpp) \
$(pkg-config --cflags nlohmann_json) \
-Ijson-schema-validator/src \
-o validate_yaml_file \
validate_yaml_file.cpp \
json-schema-validator/src/json-uri.cpp \
json-schema-validator/src/json-validator.cpp \
json-schema-validator/src/json-schema-draft7.json.cpp \
json-schema-validator/src/json-patch.cpp \
$(pkg-config --libs yaml-cpp)
- name: "Validate feature files"
run: |
for file in features_c*.yaml; do
echo "Verifying: $file"
./validate_yaml_file "$file"
done