1111 - ' main'
1212 workflow_dispatch :
1313
14+ concurrency :
15+ group : ${{ github.workflow }}-${{ github.ref }}
16+ cancel-in-progress : true
17+
1418jobs :
1519
1620 pre-commit-check :
@@ -20,30 +24,18 @@ jobs:
2024 - name : Checkout
2125 uses : actions/checkout@v4
2226 - name : Install uv
23- uses : astral-sh/setup-uv@v4
27+ uses : astral-sh/setup-uv@v5
2428 with :
25- version : " latest "
29+ enable-cache : true
2630 - name : Set up Python
27- uses : actions/setup-python@v5
28- with :
29- python-version : " 3.11"
30- - name : Cache pre-commit dependencies
31- id : cache_pre_commit
31+ run : uv python install 3.11
32+ - name : Install dependencies
33+ run : uv sync --frozen
34+ - name : Cache pre-commit
3235 uses : actions/cache@v4
3336 with :
34- path : |
35- .pre_commit_venv
36- ~/.cache/pre-commit
37- key : pre-commit-${{ hashFiles('.pre-commit-config.yaml','~/.cache/pre-commit/*') }}
38- - name : Install pre-commit
39- if : steps.cache_pre_commit.outputs.cache-hit != 'true'
40- run : |
41- python -m venv .pre_commit_venv
42- . .pre_commit_venv/bin/activate
43- pip install --upgrade pip
44- pip install pre-commit
45- pre-commit install --install-hooks
46- pre-commit gc
37+ path : ~/.cache/pre-commit
38+ key : pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
4739 - name : Run pre-commit hooks
4840 run : |
4941 if [ "$GITHUB_EVENT_NAME" == "pull_request" -a -n "$GITHUB_HEAD_REF" ]; then
@@ -52,15 +44,14 @@ jobs:
5244 echo "::add-matcher::.github/workflows/flake8-matcher.json"
5345 echo "::add-matcher::.github/workflows/mypy-matcher.json"
5446 fi
55- . .pre_commit_venv/bin/activate
56- pre-commit run --color=always --all-files
47+ uv run pre-commit run --color=always --all-files
5748
5849 test-unit :
5950
6051 runs-on : ubuntu-latest
6152 strategy :
6253 matrix :
63- python-version : ["3.11", "3.12", "3.13"]
54+ python-version : ["3.11", "3.12", "3.13", "3.14", "3.14t" ]
6455 services :
6556 redis :
6657 image : redis:7-alpine
@@ -76,32 +67,29 @@ jobs:
7667 - name : Checkout
7768 uses : actions/checkout@v4
7869 - name : Install uv
79- uses : astral-sh/setup-uv@v4
70+ uses : astral-sh/setup-uv@v5
8071 with :
81- version : " latest "
72+ enable-cache : true
8273 - name : Set up Python
83- uses : actions/setup-python@v5
84- with :
85- python-version : ${{ matrix.python-version }}
86- - name : Install dependencies
87- run : |
88- sudo apt install -y libsnappy-dev
89- uv sync --extra zeromq --extra redis --extra thrift --extra snappy
74+ run : uv python install ${{ matrix.python-version }}
75+ - name : Install system dependencies
76+ run : sudo apt install -y libsnappy-dev
77+ - name : Install Python dependencies
78+ run : uv sync --frozen --extra zeromq --extra redis --extra thrift --extra snappy
9079 - name : Run unit tests
9180 env :
9281 REDIS_HOST : localhost
9382 REDIS_PORT : ${{ job.services.redis.ports[6379] }}
94- run : |
95- uv run python -m pytest --cov tests
83+ run : uv run python -m pytest --cov tests
9684 - name : Upload coverage report
97- uses : codecov/codecov-action@v3
85+ uses : codecov/codecov-action@v5
9886
9987 test-integration :
10088
10189 runs-on : ubuntu-latest
10290 strategy :
10391 matrix :
104- python-version : ["3.11", "3.12", "3.13"]
92+ python-version : ["3.11", "3.12", "3.13", "3.14", "3.14t" ]
10593 services :
10694 redis :
10795 image : redis:7-alpine
@@ -117,23 +105,20 @@ jobs:
117105 - name : Checkout
118106 uses : actions/checkout@v4
119107 - name : Install uv
120- uses : astral-sh/setup-uv@v4
108+ uses : astral-sh/setup-uv@v5
121109 with :
122- version : " latest "
110+ enable-cache : true
123111 - name : Set up Python
124- uses : actions/setup-python@v5
125- with :
126- python-version : ${{ matrix.python-version }}
127- - name : Install dependencies
128- run : |
129- sudo apt install -y libsnappy-dev
130- uv sync --extra zeromq --extra redis --extra thrift --extra snappy
112+ run : uv python install ${{ matrix.python-version }}
113+ - name : Install system dependencies
114+ run : sudo apt install -y libsnappy-dev
115+ - name : Install Python dependencies
116+ run : uv sync --frozen --extra zeromq --extra redis --extra thrift --extra snappy
131117 - name : Run integration tests
132118 env :
133119 REDIS_HOST : localhost
134120 REDIS_PORT : ${{ job.services.redis.ports[6379] }}
135- run : |
136- uv run ./scripts/run-integration-tests.sh
121+ run : uv run ./scripts/run-integration-tests.sh
137122
138123 build-distributions :
139124 needs : [pre-commit-check, test-unit, test-integration]
@@ -146,16 +131,13 @@ jobs:
146131 - name : Fetch remote tags
147132 run : git fetch origin 'refs/tags/*:refs/tags/*' -f
148133 - name : Install uv
149- uses : astral-sh/setup-uv@v4
134+ uses : astral-sh/setup-uv@v5
150135 with :
151- version : " latest "
136+ enable-cache : true
152137 - name : Set up Python
153- uses : actions/setup-python@v5
154- with :
155- python-version : " 3.11"
138+ run : uv python install 3.11
156139 - name : Install dependencies
157- run : |
158- uv sync
140+ run : uv sync --frozen
159141 - name : Build packages
160142 run : |
161143 uv run python -c "import callosum; print(callosum.__version__)" | tee version.txt
@@ -193,14 +175,14 @@ jobs:
193175 with :
194176 name : distributions
195177 path : dist
178+ - name : Install uv
179+ uses : astral-sh/setup-uv@v5
196180 - name : Set up Python
197- uses : actions/setup-python@v5
198- with :
199- python-version : " 3.11"
181+ run : uv python install 3.11
200182 - name : Extract the release changelog
201183 run : |
202- python ./scripts/extract-release-changelog.py
203- python ./scripts/determine-release-type.py
184+ uv run python ./scripts/extract-release-changelog.py
185+ uv run python ./scripts/determine-release-type.py
204186 - name : Publish to GitHub
205187 uses : softprops/action-gh-release@v2
206188 with :
0 commit comments