forked from python-acoustics/python-acoustics
-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (27 loc) · 969 Bytes
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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