Skip to content

Commit

Permalink
Use a list of deployed schemas in comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyMcCormick committed Dec 5, 2024
1 parent d5f411c commit 0d2da16
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/compare.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,18 @@ jobs:
run: |
set -e
ERROR_FLAG=0
DEPLOYED_SCHEMAS=$(cat DEPLOYED.txt)
for file in ${{ env.CHANGED_FILES }}; do
echo "Comparing $file:"
MAIN_FILE=main-branch/${{ env.SCHEMA_DIR }}/$file
CURRENT_FILE=current-ref/${{ env.SCHEMA_DIR }}/$file
if ! felis --log-level ERROR diff -E -c alembic $MAIN_FILE $CURRENT_FILE; then
echo "Error comparing $file"
ERROR_FLAG=1
if echo "$DEPLOYED_SCHEMAS" | grep -q "^$file$"; then
echo "Comparing $file:"
MAIN_FILE=main-branch/${{ env.SCHEMA_DIR }}/$file
CURRENT_FILE=current-ref/${{ env.SCHEMA_DIR }}/$file
if ! felis --log-level ERROR diff -E -c alembic $MAIN_FILE $CURRENT_FILE; then
echo "Error comparing $file"
ERROR_FLAG=1
fi
else
echo "Skipping $file (not in DEPLOYED.txt)"
fi
done
if [ $ERROR_FLAG -ne 0 ]; then
Expand Down
4 changes: 4 additions & 0 deletions python/lsst/sdm_schemas/schemas/DEPLOYED.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dp02_dc2.yaml
dp02_obscore.yaml
dp03_10yr.yaml
dp03_1yr.yaml

0 comments on commit 0d2da16

Please sign in to comment.