-
Notifications
You must be signed in to change notification settings - Fork 2.4k
46 lines (37 loc) · 1.36 KB
/
check_compatibility.yml
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
46
name: Check compatibility
on:
pull_request:
merge_group:
types: [checks_requested]
jobs:
check-compatibility:
runs-on: ubuntu-latest
steps:
- name: Checkout the PR
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Extract PR public interfaces
run: |
make init
bin/public_interface.py extract > "${{ runner.temp }}"/interfaces.new.json
- name: Backup PR bin/public_interface.py
run: |
# Keep a copy of bin/public_interface.py
# So we are using the same bin/public_interface.py to process old/new codebase.
cp bin/public_interface.py "${{ runner.temp }}"/public_interface.py
- name: Checkout the base
uses: actions/checkout@v4
with:
ref: "${{ github.base_ref }}"
- name: Extract original public interfaces
run: |
make init
# Recover bin/public_interface.py
cp "${{ runner.temp }}"/public_interface.py bin/public_interface.py
bin/public_interface.py extract > "${{ runner.temp }}"/interfaces.original.json
- name: Detect compatibility breaking changes
id: detect
run: |
bin/public_interface.py check "${{ runner.temp }}"/interfaces.original.json "${{ runner.temp }}"/interfaces.new.json