Skip to content

Commit

Permalink
Integrate with GitHub Actions
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
  • Loading branch information
jviotti committed Jul 26, 2024
1 parent f5d9a82 commit a7fa70c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Intelligence.AI SchemaHub

on:
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: intelligence-ai/jsonschema@v2.6.0
- uses: actions/checkout@v4
- run: make
2 changes: 1 addition & 1 deletion scripts/collections-fetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ OUTPUT="$2"

echo "-- Fetching collections from $DIRECTORY into $OUTPUT" 1>&2

find "$DIRECTORY" -name '*.json' -type f -depth 2 | while IFS= read -r collection
find "$DIRECTORY" -mindepth 2 -maxdepth 2 -name '*.json' -type f | while IFS= read -r collection
do
NAMESPACE="$(basename "$(dirname "$collection")")"
ID="$(basename "$collection" .json)"
Expand Down
2 changes: 1 addition & 1 deletion scripts/collections-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ slugify() {

echo "-- Installing collection schemas from $DIRECTORY into $OUTPUT" 1>&2

find "$DIRECTORY" -name '*.json' -type f -depth 2 | while IFS= read -r collection
find "$DIRECTORY" -mindepth 2 -maxdepth 2 -name '*.json' -type f | while IFS= read -r collection
do
NAMESPACE="$(basename "$(dirname "$collection")")"
ID="$(basename "$collection" .json)"
Expand Down
4 changes: 2 additions & 2 deletions scripts/generate-configuration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ copy_string_property_if_present() {
RESULT="$TMP/configuration.json"
jq --raw-output --null-input '$ARGS.named' --arg url "$BASE_URL" > "$RESULT"

find "$DIRECTORY" -name '*.json' -type f -depth 2 | while IFS= read -r collection
find "$DIRECTORY" -mindepth 2 -maxdepth 2 -name '*.json' -type f | while IFS= read -r collection
do

NAMESPACE="$(basename "$(dirname "$collection")")"
Expand All @@ -71,7 +71,7 @@ do
fi
done

find "$DIRECTORY" -name '*.json' -type f -depth 1 | while IFS= read -r manifest
find "$DIRECTORY" -mindepth 1 -maxdepth 1 -name '*.json' -type f | while IFS= read -r manifest
do
echo "-- Analyzing manifest $manifest" 1>&2
NAMESPACE="$(basename "$manifest" .json)"
Expand Down

0 comments on commit a7fa70c

Please sign in to comment.