Skip to content

Commit 94fb4aa

Browse files
committed
refactor: github CI
1 parent 23d7b4d commit 94fb4aa

1 file changed

Lines changed: 32 additions & 19 deletions

File tree

.github/workflows/ci.yml

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,42 @@ jobs:
77
strategy:
88
matrix:
99
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
10-
os: [ubuntu]
10+
os: [ubuntu-latest]
1111
fail-fast: true
12-
runs-on: ${{ matrix.os }}-latest
12+
runs-on: ${{ matrix.os }}
1313
timeout-minutes: 5
1414
steps:
15-
- uses: actions/checkout@master
16-
- uses: actions/setup-python@v2
15+
- uses: actions/checkout@v4
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v5
1718
with:
1819
python-version: ${{ matrix.python-version }}
19-
architecture: x64
20-
- uses: actions/cache@v2
20+
- name: Cache dependencies
21+
uses: actions/cache@v3
2122
with:
22-
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
23-
path: ~/.cache/pip
24-
restore-keys: |
25-
${{ runner.os }}-pip-
26-
- name: Install Python dependencies
27-
uses: py-actions/py-dependency-install@v2
28-
with:
29-
path: "./requirements-dev.txt"
30-
- name: Run lint & tests
23+
key: ${{ runner.os }}-uv-${{ hashFiles('**/requirements-dev.txt') }}
24+
path: |
25+
~/.cache/uv
26+
~/.cache/pip
27+
venv
28+
- name: Install UV
29+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
30+
- name: Setup virtual environment
31+
run: uv venv -p python3 venv
32+
- name: Install dependencies
33+
run: |
34+
source venv/bin/activate
35+
uv pip install --upgrade -r requirements-dev.txt
36+
uv pip install -e .
37+
- name: Build Cython extensions
38+
run: |
39+
source venv/bin/activate
40+
make clean build USE_CYTHON=1
41+
- name: Run lint and tests
42+
run: |
43+
source venv/bin/activate
44+
make ci
45+
- name: Run benchmarks
3146
run: |
32-
make build USE_CYTHON=1
33-
make ci SKIP_STYLE=true
34-
- name: Run pytest benchmark
35-
run: pytest benchmark/test_pybmoore.py
47+
source venv/bin/activate
48+
pytest benchmark/test_pybmoore.py

0 commit comments

Comments
 (0)