Skip to content

Commit b0ee89f

Browse files
jaredparCopilot
andcommitted
Add CI step to verify generated code is up-to-date
Runs the generator after restore and fails the build if there are any uncommitted diffs, ensuring PRs always include freshly generated output. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent baaf682 commit b0ee89f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ jobs:
2424
- name: Restore dependencies
2525
run: dotnet restore
2626

27+
- name: Verify generated code is up-to-date
28+
run: |
29+
dotnet run --project Src/Generate
30+
git diff --exit-code || (echo "Generated code is out of date. Run 'dotnet run --project Src/Generate' and commit the results." && exit 1)
31+
2732
- name: Build
2833
run: dotnet build --no-restore -bl
2934

0 commit comments

Comments
 (0)