Skip to content

Commit 036311d

Browse files
committed
CI: Run pytest-cov
1 parent d7f5742 commit 036311d

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/main.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ jobs:
5858
python-version: ${{ matrix.python-version }}
5959
- name: Run unit tests
6060
run: |
61-
python3 -m pytest tests/unit
61+
python3 -m pytest --cov=custom_components.octopus_energy tests/unit
62+
6263
integration_tests:
6364
# Tests are geared towards my account, so ignore for others
6465
if: ${{ github.repository_owner == 'BottlecapDave' && github.repository_owner == github.actor }}
@@ -81,7 +82,7 @@ jobs:
8182
python-version: ${{ matrix.python-version }}
8283
- name: Run integration tests
8384
run: |
84-
python3 -m pytest tests/integration
85+
python3 -m pytest --cov=custom_components.octopus_energy --cov-append tests/integration
8586
env:
8687
API_KEY: ${{ secrets.OCTOPUS_ENERGY_API_TOKEN }}
8788
GAS_MPRN: ${{ secrets.OCTOPUS_ENERGY_GAS_MPRN }}

requirements.test.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
pytest
22
pytest-socket
33
pytest-asyncio
4+
pytest-cov
45
mock
56
homeassistant
67
pydantic
78
psutil-home-assistant
89
sqlalchemy
910
fnvhash
10-
fnv_hash_fast
11+
fnv_hash_fast

0 commit comments

Comments
 (0)