Skip to content

Merge branch 'main' of https://github.com/cdervis/cppstat #206

Merge branch 'main' of https://github.com/cdervis/cppstat

Merge branch 'main' of https://github.com/cdervis/cppstat #206

Workflow file for this run

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