-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (49 loc) · 1.35 KB
/
Copy pathworkflow.yaml
File metadata and controls
62 lines (49 loc) · 1.35 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
name: ci-tests
on: pull_request
jobs:
pre-commit:
name: Check pre-commit integration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install Zig
uses: mlugg/setup-zig@v2
with:
version: "0.16.0"
- name: Install dependencies
run: python -m pip install pre-commit
- name: Install pre-commit
run: |
pre-commit install
- name: Update pre-commit
run: |
pre-commit autoupdate
- name: Run pre-commit
run: |
pre-commit run -a
check:
name: Check Changelog Fragments
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Ensure base branch exists
run: git fetch origin ${{ github.base_ref }}
- name: Check new fragment exists
run: |
if [ -z "$(git diff --name-only --diff-filter=A "origin/${{ github.base_ref }}" -- '.changes/unreleased/*.yaml')" ]; then
echo "No changelog fragment found in .changes/unreleased/"
echo "Run 'zig build changie:add' to create one."
exit 1
fi