Skip to content

Commit

Permalink
ci: Add a build step that ensures that open api spec doesn't diverge
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedBassem committed Oct 20, 2024
1 parent 5b20d97 commit f793646
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,28 @@ jobs:

- name: Typecheck
run: pnpm typecheck
open-api-spec:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup
uses: ./tooling/github/setup

- name: Regenerate OpenAPI spec
working-directory: packages/open-api
run: pnpm run generate

- name: Check for changes
run: |
if [[ -n "$(git status --porcelain)" ]]; then
echo "Error: Generated files are not up to date!"
echo "The following files have changes:"
git status --porcelain
echo ""
echo "Please regenerate the files locally with (pnpm run generate) and commit the changes."
git diff
exit 1
else
echo "✅ Generated files are up to date!"
fi

0 comments on commit f793646

Please sign in to comment.