From b5661f256cb5e1121bfbf8134ac3ee76fd000740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Mon, 3 Jun 2024 19:31:15 +0100 Subject: [PATCH] ci: upload code coverage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe LaĆ­ns --- .github/workflows/test.yml | 10 +++++++++- pyproject.toml | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d832030..3023d70 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,4 +37,12 @@ jobs: with: python-version: ${{ matrix.python }} - run: python -m pip install .[test] - - run: python -m pytest --showlocals -vv + - run: python -m pytest --showlocals -vv --cov --cov-report=xml + - uses: codecov/codecov-action@v4 + if: always() + env: + PYTHON: ${{ matrix.python }} + with: + flags: tests + env_vars: PYTHON + name: ${{ matrix.os }} - ${{ matrix.python }} diff --git a/pyproject.toml b/pyproject.toml index a05d02e..85604b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,6 +40,7 @@ dependencies = [ [project.optional-dependencies] test = [ 'pytest', + 'pytest-cov >= 5', 'pytest-mock >= 2', 'pytest-order >= 1', 'pytest-github-actions-annotate-failures',