Skip to content

Commit

Permalink
ci: update json format ci
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-seongwoo-jun committed Jul 31, 2023
1 parent b7364b6 commit bdd8caa
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/json_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: JSON formatting checker
on:
push:
paths:
- "mac-device-identifiers*.json"
- "*-device-identifiers*.json"
pull_request:
paths:
- "mac-device-identifiers*.json"
- "*-device-identifiers*.json"

jobs:
format:
Expand All @@ -23,14 +23,17 @@ jobs:

- name: Format JSON files
run: |
npx jsonlint -i ios-device-identifiers.json
npx jsonlint -i tvos-device-identifiers.json
npx jsonlint -i watchos-device-identifiers.json
npx jsonlint -i mac-device-identifiers.json
npx jsonlint -i mac-device-identifiers-unique.json
- name: Check JSON files have changed
run: |
git diff --exit-code --quiet mac-device-identifiers*.json
git diff --exit-code --quiet *-device-identifiers*.json
- name: Check JSON length is same
- name: Check mac-device-identifiers.json is unique
run: |
length1=`cat mac-device-identifiers.json | jq length`
length2=`cat mac-device-identifiers-unique.json | jq length`
Expand Down

0 comments on commit bdd8caa

Please sign in to comment.