From 054e01dbb6008cf1dfa6293291935d19c90b3e09 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 15 Oct 2023 12:17:15 -1000 Subject: [PATCH] Start tracking code coverage (#580) --- .github/workflows/ci.yml | 6 ++++-- requirements_test.txt | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) 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