diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e70a655..efbbc18 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,9 +86,11 @@ jobs: - run: mypy aioesphomeapi name: Check typing with mypy if: ${{ matrix.python-version == '3.11' && matrix.extension == 'skip_cython' }} - - run: pytest -vv --tb=native tests + - run: pytest -vv --cov --cov-report=xml --tb=native tests name: Run tests with pytest - - run: | + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + - run: | docker run \ -v "$PWD":/aioesphomeapi \ ghcr.io/esphome/aioesphomeapi-proto-builder:latest diff --git a/requirements_test.txt b/requirements_test.txt index 9c034be..3f2941b 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -7,3 +7,4 @@ types-protobuf==4.24.0.2 pytest>=6.2.4,<8 pytest-asyncio>=0.15.1,<1 mock>=4.0.3,<6 +pytest-cov>=4.1.0