Update to use uv for package management #54
Workflow file for this run
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
name: Test package | |
on: [pull_request, workflow_call] | |
jobs: | |
test-pytest: | |
name: Test with Pytest | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v4 | |
# Following steps given here: https://docs.astral.sh/uv/guides/integration/github/#setting-up-python | |
- 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: Lint with Ruff | |
run: uv run ruff check --output-format=github --target-version=py310 . | |
continue-on-error: true | |
- name: Test with pytest | |
run: | | |
uv pip install pytest-cov | |
uv run pytest -v -s --cov=acoustic_toolbox tests/ | |
- name: Generate Coverage Report | |
run: uv run coverage report -m | |