mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 02:15:01 +00:00
Check Grats artifacts in CI
This commit is contained in:
parent
6ce866f48c
commit
b090082dfa
2 changed files with 33 additions and 0 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -29,6 +29,8 @@ jobs:
|
|||
- name: Lint and type-check
|
||||
run: |
|
||||
npx turbo lint type-check
|
||||
- name: Validate Grats generated files are up-to-date
|
||||
run: ./scripts/validate-grats.sh
|
||||
- name: Run tests
|
||||
run: |
|
||||
touch packages/skin-database/config.js
|
||||
|
|
|
|||
31
scripts/validate-grats.sh
Executable file
31
scripts/validate-grats.sh
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Script to validate that Grats generated files are up-to-date
|
||||
# This ensures that developers have run Grats locally and committed the generated files
|
||||
|
||||
set -e
|
||||
|
||||
echo "🔍 Validating Grats generated files are up-to-date..."
|
||||
|
||||
# Run Grats to regenerate schema files
|
||||
echo "Running Grats to regenerate schema files..."
|
||||
npx turbo run grats --filter=skin-database
|
||||
|
||||
# Check if the generated files were modified
|
||||
CHANGES=$(git status --porcelain packages/skin-database/api/graphql/)
|
||||
|
||||
if [ -n "$CHANGES" ]; then
|
||||
echo "❌ Grats generated files are out of date!"
|
||||
echo ""
|
||||
echo "The following generated files have changes after running Grats:"
|
||||
echo "$CHANGES"
|
||||
echo ""
|
||||
echo "Please run the following command locally and commit the changes:"
|
||||
echo " npx turbo run grats --filter=skin-database"
|
||||
echo ""
|
||||
echo "Diff of changes:"
|
||||
git diff packages/skin-database/api/graphql/
|
||||
exit 1
|
||||
else
|
||||
echo "✅ Grats generated files are up-to-date"
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue