diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index c4a8a7c0..311c77d3 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -17,46 +17,55 @@ concurrency: cancel-in-progress: true jobs: - pytest: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - python-version: ["3.10"] - - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Set min. dependencies - if: matrix.requires == 'oldest' - run: | - import os - fname = 'requirements/base.txt' - lines = [line.replace('>=', '==') for line in open(fname).readlines()] - open(fname, 'w').writelines(lines) - shell: python - - - name: Install main package & dependencies - run: | - pip install -e .[dev,extra] - pip list - - - name: Restore test's datasets - uses: actions/cache/restore@v4 - with: - path: tests/.datasets - key: test-datasets - - - name: Run test-suite - run: python -m pytest -v - - - name: Save test's datasets - uses: actions/cache/save@v4 - with: - path: tests/.datasets - key: test-datasets + pytest: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + python-version: ["3.10"] + + steps: + - uses: actions/checkout@v6 + + - name: Install uv + uses: astral-sh/setup-uv@v7 + with: + enable-cache: true + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + + - name: Set min. dependencies + if: matrix.requires == 'oldest' + run: | + import os + fname = 'requirements/base.txt' + lines = [line.replace('>=', '==') for line in open(fname).readlines()] + open(fname, 'w').writelines(lines) + shell: python + + - name: Install main package & dependencies + run: uv pip install -e .[dev,extra] + env: + UV_SYSTEM_PYTHON: 1 + + - name: Show installed packages + run: uv pip list + + - name: Restore test's datasets + uses: actions/cache/restore@v4 + with: + path: tests/.datasets + key: test-datasets + + - name: Run test-suite + run: python -m pytest -v + + - name: Save test's datasets + uses: actions/cache/save@v4 + with: + path: tests/.datasets + key: test-datasets