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 39 40 41 42 43 44 45
|
name: Test
# yamllint disable-line rule:truthy
on:
push:
branches:
- main
- master
pull_request:
workflow_dispatch:
env:
DEFAULT_PYTHON: "3.11"
jobs:
pytest:
name: Python ${{ matrix.python }}
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.10", "3.11", "3.12"]
steps:
- name: โคต๏ธ Check out code from GitHub
uses: actions/checkout@v6.0.2
- name: ๐ Set up Poetry
run: pipx install poetry
- name: ๐ Set up Python ${{ matrix.python }}
id: python
uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python }}
cache: "poetry"
- name: ๐ Install workflow dependencies
run: |
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: ๐ Install dependencies
run: poetry install --no-interaction
- name: ๐ Run pytest
run: poetry run pytest --cov PyViCare
- name: โฌ๏ธ Upload coverage artifact
uses: actions/upload-artifact@v6.0.0
with:
name: coverage-${{ matrix.python }}
path: .coverage
|