| 1 |
--- |
| 2 |
name: Testing |
| 3 |
|
| 4 |
# yamllint disable-line rule:truthy |
| 5 |
on: |
| 6 |
push: |
| 7 |
branches: |
| 8 |
- main |
| 9 |
pull_request: |
| 10 |
workflow_dispatch: |
| 11 |
|
| 12 |
env: |
| 13 |
DEFAULT_PYTHON: "3.11" |
| 14 |
|
| 15 |
jobs: |
| 16 |
pytest: |
| 17 |
name: Python ${{ matrix.python }} |
| 18 |
runs-on: ubuntu-latest |
| 19 |
strategy: |
| 20 |
matrix: |
| 21 |
python: ["3.11", "3.12", "3.13"] |
| 22 |
steps: |
| 23 |
- name: โคต๏ธ Check out code from GitHub |
| 24 |
uses: actions/[email protected] |
| 25 |
- name: ๐ Set up uv |
| 26 |
uses: astral-sh/setup-uv@v7 |
| 27 |
with: |
| 28 |
enable-cache: true |
| 29 |
- name: ๐ Set up Python ${{ matrix.python }} |
| 30 |
run: uv python install ${{ matrix.python }} |
| 31 |
- name: ๐ Install dependencies |
| 32 |
run: uv sync --group dev |
| 33 |
- name: ๐ Run pytest |
| 34 |
run: uv run pytest --cov aiowebdav2 tests |
| 35 |
- name: โฌ๏ธ Upload coverage artifact |
| 36 |
uses: actions/upload-artifact@v7 |
| 37 |
with: |
| 38 |
name: coverage-${{ matrix.python }} |
| 39 |
path: .coverage |
| 40 |
include-hidden-files: true |
| 41 |
|
| 42 |
coverage: |
| 43 |
runs-on: ubuntu-latest |
| 44 |
needs: pytest |
| 45 |
steps: |
| 46 |
- name: โคต๏ธ Check out code from GitHub |
| 47 |
uses: actions/[email protected] |
| 48 |
with: |
| 49 |
fetch-depth: 0 |
| 50 |
- name: โฌ๏ธ Download coverage data |
| 51 |
uses: actions/download-artifact@v8 |
| 52 |
- name: ๐ Set up uv |
| 53 |
uses: astral-sh/setup-uv@v7 |
| 54 |
with: |
| 55 |
enable-cache: true |
| 56 |
- name: ๐ Set up Python ${{ env.DEFAULT_PYTHON }} |
| 57 |
run: uv python install ${{ env.DEFAULT_PYTHON }} |
| 58 |
- name: ๐ Install dependencies |
| 59 |
run: uv sync --group dev |
| 60 |
- name: ๐ Process coverage results |
| 61 |
run: | |
| 62 |
uv run coverage combine coverage*/.coverage* |
| 63 |
uv run coverage xml -i |
| 64 |
- name: ๐ Upload coverage report |
| 65 |
uses: codecov/[email protected] |