-
Notifications
You must be signed in to change notification settings - Fork 6
45 lines (37 loc) · 1.09 KB
/
contract-tests.yml
File metadata and controls
45 lines (37 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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