|
7 | 7 | strategy: |
8 | 8 | matrix: |
9 | 9 | python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] |
10 | | - os: [ubuntu] |
| 10 | + os: [ubuntu-latest] |
11 | 11 | fail-fast: true |
12 | | - runs-on: ${{ matrix.os }}-latest |
| 12 | + runs-on: ${{ matrix.os }} |
13 | 13 | timeout-minutes: 5 |
14 | 14 | 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 |
17 | 18 | with: |
18 | 19 | python-version: ${{ matrix.python-version }} |
19 | | - architecture: x64 |
20 | | - - uses: actions/cache@v2 |
| 20 | + - name: Cache dependencies |
| 21 | + uses: actions/cache@v3 |
21 | 22 | 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 |
31 | 46 | 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