Repository navigation
88 lines (77 loc) · 2.32 KB
/
Copy pathpr.yml
File metadata and controls
88 lines (77 loc) · 2.32 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Pull Request Checks
on:
pull_request:
branches:
- main
types:
- opened
- reopened
- edited
- synchronize
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
validate-pr-title:
name: Validate PR title
runs-on: depot-ubuntu-24.04
permissions:
pull-requests: read
steps:
- name: Validate PR title
uses: amannn/action-semantic-pull-request@66e72920af32222769c386d81f89656ebcb6d6d5 # v6.1.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
feat
fix
docs
style
refactor
perf
test
build
ci
chore
revert
check:
name: Check
runs-on: depot-ubuntu-24.04
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 0
- name: Setup Python and uv
uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
- name: Setup just
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4
- name: Check preserved repository files
env:
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
run: |
changed_fixtures="$(git diff --no-renames --diff-filter=MDT --name-only "$PR_BASE_SHA" HEAD -- tests/runtime/fixtures/ tests/engine/fixtures/)"
if [[ -n "$changed_fixtures" ]]; then
printf '::error::Historical snapshot fixtures must remain unchanged:\n%s\n' "$changed_fixtures"
exit 1
fi
if git ls-files --error-unmatch examples/slim_llm/credentials.json >/dev/null 2>&1; then
echo '::error::Local example credentials must not be committed.'
exit 1
fi
- name: Validate PR body
if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' }}
run: python3 .github/scripts/check_pr.py
- name: Run checks
run: just check
test:
name: Test
needs: check
permissions:
contents: read
uses: ./.github/workflows/test.yml