Skip to content

qa: Enforce JSON lint for GCT configs #1

qa: Enforce JSON lint for GCT configs

qa: Enforce JSON lint for GCT configs #1

Workflow file for this run

name: config-json-lint
on: [push, pull_request]
jobs:
lint:
name: JSON format check
runs-on: ubuntu-latest
strategy:
matrix:
file: ["config_example.json", "testdata/configtest.json"]
steps:
- uses: actions/checkout@v4
- name: Install jq
run: sudo apt-get install jq
- name: Check JSON format for ${{ matrix.file }}
run: |
jq '.exchanges |= sort_by(.name)' --indent 1 ${{ matrix.file }} > processed_${{ matrix.file }}
if ! diff ${{ matrix.file }} processed_${{ matrix.file }}; then
echo "Differences found in ${{ matrix.file }}! Please run 'make lint_configs'"
exit 1
fi