Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 52 additions & 43 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading