Skip to content

Commit 88adb15

Browse files
committed
CI: Run pytest-cov
1 parent 6c7ab1e commit 88adb15

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
@@ -50,7 +50,8 @@ jobs:
5050
uses: ./.github/actions/setup
5151
- name: Run unit tests
5252
run: |
53-
python -m pytest tests/unit
53+
python -m pytest --cov=octopusenergy tests/unit
54+
5455
integration_tests:
5556
# Tests are geared towards my account, so ignore for others
5657
if: ${{ github.repository_owner == 'BottlecapDave' && github.repository_owner == github.actor }}
@@ -65,7 +66,7 @@ jobs:
6566
uses: ./.github/actions/setup
6667
- name: Run integration tests
6768
run: |
68-
python -m pytest tests/integration
69+
python -m pytest --cov=octopusenergy --cov-append tests/integration
6970
env:
7071
API_KEY: ${{ secrets.OCTOPUS_ENERGY_API_TOKEN }}
7172
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)