-
Notifications
You must be signed in to change notification settings - Fork 772
40 lines (36 loc) · 1.12 KB
/
pr-and-push.yml
File metadata and controls
40 lines (36 loc) · 1.12 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
name: Pull Request and Push Action
on:
pull_request: # Safer than pull_request_target for untrusted code
branches: [ main ]
types: [opened, synchronize, reopened, ready_for_review]
push:
branches: [ main ] # Also run on direct pushes to main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
call-test-lint:
uses: ./.github/workflows/test-lint.yml
permissions:
contents: read
with:
ref: ${{ github.event.pull_request.head.sha }}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
check-api:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0 # We the need the full Git history.
- name: Setup uv
uses: astral-sh/setup-uv@v7
- name: Check API breaking changes
run: |
if ! uvx griffe check --search src --format github strands --against "main"; then
echo "Potential API changes detected (review if actually breaking)"
exit 1
fi