Skip to content

Commit

Permalink
ci: run missing functions script
Browse files Browse the repository at this point in the history
  • Loading branch information
Odonno committed Sep 14, 2024
1 parent 8b0a97b commit 6e70f16
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Validate

on:
push:
branches:
- main
pull_request:

jobs:
missing-functions:
name: Detect missing functions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install
working-directory: ./scripts
- run: bun run index.ts
working-directory: ./scripts
5 changes: 5 additions & 0 deletions scripts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ const detectMissingFunctions = async () => {
console.log(`* ${removedFunction}`);
}
}

// exit with error code if there are undocumented functions
if (undocumentedFunctions.length > 0) {
process.exit(1);
}
};

await detectMissingFunctions();

0 comments on commit 6e70f16

Please sign in to comment.