Skip to content

Commit

Permalink
update GH action to use uv
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchellAcoustics committed Oct 29, 2024
1 parent 8ed40dd commit 4b61d4e
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,26 @@ jobs:

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 }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.lock ]; then pip install -r requirements.lock; fi
run: uv python install ${{ matrix.python-version }}

- name: Install the project
run: uv sync --all-extras --dev

- name: Lint with Ruff
run: |
pip install ruff
ruff --format=github --target-version=py310 .
run: uv run ruff check --output-format=github --target-version=py310 .
continue-on-error: true

- name: Test with pytest
run: |
pip install coverage pytest
coverage run -m pytest -v -s
uv pip install pytest-cov
uv run pytest -v -s --cov=acoustic_toolbox tests/
- name: Generate Coverage Report
run: |
coverage report -m
run: uv run coverage report -m

0 comments on commit 4b61d4e

Please sign in to comment.