Skip to content

Commit

Permalink
chore: fix linting CI step
Browse files Browse the repository at this point in the history
  • Loading branch information
cwaldren-ld authored Mar 6, 2024
1 parent af4e7e8 commit 8802830
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate JSON Formatting
- name: Format JSON
run: |
./scripts/ci/format-json.sh
if ! git diff-index --quiet HEAD; then
echo "Run ./scripts/ci/format-json.sh to reformat the JSON data"
exit 1
fi
- name: Ensure no formatting changes needed
run: git diff --exit-code
- name: Validate JSON schemas
run: |
./scripts/ci/check-json-schemas.sh
Expand Down
2 changes: 2 additions & 0 deletions scripts/ci/check-json-schemas.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -e

mapfile -t schemas < <(git grep -Fl 'https://json-schema.org' '**/*.json')

function runTest() {
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/sdk-consistency.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ for file in ./data/*.json; do
continue
fi
jq -r 'keys[]' "$file" | sort > "$file.keys"
if diff -q sdks.json.keys "$file.keys" > /dev/null; then
if diff -q ./data/sdks.json.keys "$file.keys" > /dev/null; then
echo "$file is consistent"
else
echo "$file is missing some SDK IDs:"
Expand Down

0 comments on commit 8802830

Please sign in to comment.