diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c1f2b1e6a6..71dd6894a0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,7 @@ on: jobs: unit-tests: name: unit tests - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 timeout-minutes: 1 #strategy: # fail-fast: false @@ -21,24 +21,32 @@ jobs: # run: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - cache: 'pip' - python-version: '3.11' - - run: pip install -e .[testing,docs] - - run: scons -j$(nproc) - - run: pytest -n logical --durations=0 + - name: setup python + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + uv venv + # TODO: remove setuptools once https://github.com/cython/cython/issues/5751 is fixed + uv pip install -e .[testing,docs] setuptools + - run: uv run scons -j$(nproc) + - run: uv run pytest --durations=0 static-analysis: name: static analysis - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 timeout-minutes: 1 steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - cache: 'pip' - python-version: '3.11' - run: sudo apt install --no-install-recommends -y cppcheck - - run: pip install -e . - - uses: pre-commit/action@v3.0.1 + - name: setup python + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + uv venv + uv pip install -e . pre-commit + - name: cache pre-commit environments + uses: actions/cache@v4 + with: + path: ~/.cache/pre-commit + key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} + restore-keys: | + ${{ runner.os }}-pre-commit- + - run: uv run pre-commit run --all