Skip to content

Commit

Permalink
workflow: Use uv in pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
monochromatti committed Nov 5, 2024
1 parent a171716 commit c83d021
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,14 @@ jobs:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install the project
run: uv sync --all-extras --dev
- name: Test with pytest
run: pytest --doctest-modules --junitxml=junit/test-results-${{ matrix.python-version }}.xml
run: uv run pytest --doctest-modules --junitxml=junit/test-results-${{ matrix.python-version }}.xml
- name: Upload pytest test results
uses: actions/upload-artifact@v4
with:
Expand All @@ -33,6 +31,7 @@ jobs:

linux:
name: Build wheels for Linux
needs: [test]
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -59,6 +58,7 @@ jobs:

musllinux:
name: Build wheels for MuslLinux
needs: [test]
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -85,6 +85,7 @@ jobs:

windows:
name: Build wheels for Windows
needs: [test]
runs-on: windows-latest
strategy:
fail-fast: false
Expand All @@ -110,6 +111,7 @@ jobs:

macos:
name: Build wheels for macOS
needs: [test]
runs-on: macos-latest
strategy:
fail-fast: false
Expand Down
6 changes: 1 addition & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@

perSystem = { config, self', inputs', pkgs, system, ... }: {
devenv.shells.default = {
packages = with pkgs; [ maturin ];
languages.python = {
enable = true;
uv.enable = true;
};
packages = with pkgs; [ maturin uv ];
languages.rust.enable = true;
};
};
Expand Down

0 comments on commit c83d021

Please sign in to comment.