@@ -3,38 +3,28 @@ name: Integration checks
33on :
44 pull_request :
55
6+ concurrency :
7+ group : ${{ github.workflow }}-${{ github.head_ref || github.ref }}
8+ cancel-in-progress : true
9+
10+ permissions :
11+ contents : read
12+
613env :
714 CLICOLOR : 1
8- PYTHON_VERSION : 3.12
9- RUFF_VERSION : 0.9.1 # Using same version as pre-commit-config.yaml
1015
1116jobs :
12- uv :
17+ type-check :
1318 runs-on : ubuntu-latest
19+ timeout-minutes : 15
1420 steps :
1521 - uses : actions/checkout@v6
1622
1723 - name : Setup uv
1824 uses : astral-sh/setup-uv@v7
19- id : setup-uv
20- with :
21- enable-cache : true
22- ignore-nothing-to-cache : true
23- pyproject-file : " pyproject.toml"
24- python-version : ${{ env.PYTHON_VERSION }}
25- cache-dependency-glob : |
26- **/pyproject.toml
27- **/uv.lock
28-
29- - name : Log if uv cache was restored
30- if : steps.setup-uv.outputs.cache-hit == 'true'
31- run : echo "Cache was restored"
32-
33- - name : Print the installed uv version
34- run : echo "Installed uv version is ${{ steps.setup-uv.outputs.uv-version }}"
3525
3626 - name : Install the project dependencies
37- run : uv sync --all-groups
27+ run : uv sync --all-groups --frozen
3828
3929 - name : Run ty
4030 run : make ty
@@ -44,68 +34,39 @@ jobs:
4434
4535 formatting :
4636 runs-on : ubuntu-latest
37+ timeout-minutes : 5
4738 steps :
4839 - uses : actions/checkout@v6
4940
5041 - name : Spell Check
5142 uses : crate-ci/typos@v1.45.1
5243
53- - name : Formatting
44+ - name : Lint
5445 uses : astral-sh/ruff-action@v3
5546 with :
56- version : ${{ env.RUFF_VERSION }}
57- args : check --fix --exit-non-zero-on-fix
47+ args : check
48+
49+ - name : Format check
50+ uses : astral-sh/ruff-action@v3
51+ with :
52+ args : format --check
5853
5954 semver-bump :
6055 runs-on : ubuntu-latest
61- env :
62- TARGET_BRANCH : ${{ github.base_ref }}
63- HEAD_BRANCH : ${{ github.head_ref }}
56+ timeout-minutes : 5
6457 steps :
65- - name : Checkout repository
66- uses : actions/checkout@v6
58+ - uses : actions/checkout@v6
6759 with :
6860 fetch-depth : 0
6961
70- - name : Set up Python
71- uses : actions/setup-python@v6
62+ - name : Setup uv
63+ uses : astral-sh/setup-uv@v7
64+
65+ - uses : rayepps/require-semver-bump@v1
66+ env :
67+ GITHUB_TOKEN : ${{ github.token }}
7268 with :
73- python-version : ${{ env.PYTHON_VERSION }}
74- cache : " pip"
75-
76- - name : Fetch branches
77- run : |
78- git fetch origin ${TARGET_BRANCH}
79- git fetch origin ${HEAD_BRANCH}
80-
81- - name : Install dependencies
82- run : pip install packaging
83-
84- - name : Check version bump
85- shell : bash
86- run : |
87- # Extract versions from both branches
88- old_version=$(git show origin/${TARGET_BRANCH}:pyproject.toml | grep "^version = " | cut -d'"' -f2 || echo "0.0.0")
89- new_version=$(git show origin/${HEAD_BRANCH}:pyproject.toml | grep "^version = " | cut -d'"' -f2)
90-
91- echo "Previous version: ${old_version}"
92- echo "New version: ${new_version}"
93-
94- # Compare versions using Python
95- version_increased=$(python - <<EOF
96- from packaging import version
97- old = version.parse("${old_version}")
98- new = version.parse("${new_version}")
99- print(new > old)
100- EOF
101- )
102-
103- if [ "${version_increased}" = "False" ]; then
104- echo "::error::Version must be bumped according to semantic versioning."
105- echo "Current version: ${old_version}"
106- echo "Proposed version: ${new_version}"
107- echo "Please update the version in pyproject.toml"
108- exit 1
109- else
110- echo "✅ Version bump verified: ${old_version} -> ${new_version}"
111- fi
69+ file : pyproject.toml
70+ pattern : >
71+ version = ["'](.+?)["']
72+
0 commit comments