Skip to content

Fix tests (#575)

Fix tests (#575) #75

Workflow file for this run

# .github/workflows/app.yaml
name: PyTest
on:
push:
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository code
uses: actions/checkout@v4
# Setup Python (faster than using Python container)
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install pipenv
run: |
python -m pip install --upgrade pipenv wheel
- id: cache-pipenv
uses: actions/cache@v4
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-pipenv-pytest-${{ hashFiles('**/Pipfile.lock') }}
- name: Install dependencies
run: |
pipenv install --deploy --dev
- name: Run test suite
run: |
pip install -r requirements.txt
pytest --asyncio-mode=auto custom_components/husqvarna_automower --cov=custom_components.husqvarna_automower --cov-report xml -v
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}