forked from Thomas55555/husqvarna_automower
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (37 loc) · 1.14 KB
/
pytest.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
39
40
41
42
# .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 }}