Skip to content

Update benchmark by adding dependencySection and add workflow log files #124

Update benchmark by adding dependencySection and add workflow log files

Update benchmark by adding dependencySection and add workflow log files #124

name: JSON file validation
on:
workflow_dispatch:
pull_request:
branches:
- 'main'
jobs:
validate-json:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Validate successfully reproduced breaking update JSON
uses: cardinalby/schema-validator-action@v3
with:
schema: "schemas/successful-reproduction-schemas/breaking-update.schema.json"
file: "data/benchmark/*.json"
refSchemasMap:
'{"https://github.com/chains-project/breaking-updates/blob/main/schemas/successful-reproduction-schemas/breaking-update-dependency.schema.json": "schemas/successful-reproduction-schemas/breaking-update-dependency.schema.json"}'
- name: Validate reproduction failed breaking update JSON
uses: cardinalby/schema-validator-action@v3
with:
schema: "schemas/unsuccessful-reproduction-schemas/breaking-update.schema.json"
file: "data/unsuccessful-reproductions/*.json"
refSchemasMap:
'{"https://github.com/chains-project/breaking-updates/blob/main/schemas/unsuccessful-reproduction-schemas/breaking-update-dependency.schema.json": "schemas/unsuccessful-reproduction-schemas/breaking-update-dependency.schema.json"}'
- name: Check if JSON files exist
id: file_check
run: |
if find data/not-reproduced-data -name "*.json" -print -quit | grep -q .; then
echo "check_result=true" >> $GITHUB_OUTPUT
else
echo "check_result=false" >> $GITHUB_OUTPUT
fi
- name: Validate not reproduced breaking update JSON
if: steps.file_check.outputs.check_result == 'true'
uses: cardinalby/schema-validator-action@v3
with:
schema: "schemas/not-attempted-reproduction-schemas/breaking-update.schema.json"
file: "data/not-reproduced-data/*.json"
refSchemasMap:
'{"https://github.com/chains-project/breaking-updates/blob/main/schemas/not-attempted-reproduction-schemas/breaking-update-dependency.schema.json": "schemas/not-attempted-reproduction-schemas/breaking-update-dependency.schema.json"}'