SK-2812: Public interface cleanup #37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Contract Tests | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - release/* | |
| jobs: | |
| contract-tests: | |
| name: Contract Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Verify API surface snapshot | |
| run: npm run contract-snapshot-verify | |
| - name: Show API surface diff | |
| if: failure() | |
| run: | | |
| echo "### API surface changes detected ###" | |
| echo "Lines prefixed with '-' were REMOVED from the public API." | |
| echo "Lines prefixed with '+' were ADDED to the public API." | |
| echo "" | |
| diff -u api-report/skyflow-node.api.md temp/skyflow-node.api.md || true | |
| - name: Upload API surface diff on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: api-surface-diff | |
| path: temp/skyflow-node.api.md | |
| retention-days: 7 |