-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor CI workflow to separate Python testing steps for Linux/macOS…
… and Windows
- Loading branch information
1 parent
6fcb8bb
commit 8033237
Showing
1 changed file
with
24 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -163,7 +163,7 @@ jobs: | |
name: wheels | ||
path: dist | ||
|
||
test: | ||
test_python: | ||
name: Test Python | ||
strategy: | ||
fail-fast: false | ||
|
@@ -174,17 +174,36 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
- name: Install the latest version of uv | ||
uses: astral-sh/setup-uv@v3 | ||
- name: Install Python ${{ matrix.python-version }} | ||
run: uv python install ${{ matrix.python-version }} | ||
- name: Setup, Lint, and Test Python | ||
shell: bash | ||
- name: Setup, Lint, and Test Python (Linux/macOS) | ||
if: runner.os != 'Windows' | ||
run: | | ||
cd bed_reader | ||
uvx [email protected] check . | ||
uvx ruff@latest check . || echo "Ignoring warnings from the latest version of ruff" | ||
uv sync --extra min_dev | ||
python -m pytest tests/test_opt_dep.py | ||
source ../.venv/bin/activate | ||
pytest tests/test_opt_dep.py | ||
uv sync --extra dev --extra sparse --extra samples | ||
python -m pytest . | ||
source ../.venv/bin/activate | ||
pytest . | ||
- name: Setup, Lint, and Test Python (Windows) | ||
if: runner.os == 'Windows' | ||
run: | | ||
cd bed_reader | ||
uvx [email protected] check . | ||
uvx ruff@latest check . || echo "Ignoring warnings from the latest version of ruff" | ||
uv sync --extra min_dev | ||
../.venv/Scripts/activate | ||
pytest tests/test_opt_dep.py | ||
uv sync --extra dev --extra sparse --extra samples | ||
../.venv/Scripts/activate | ||
pytest . |