From 936b69fa4125bca35b05405e92b4154a141f2095 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Sun, 27 Apr 2025 23:36:35 -0700 Subject: [PATCH] chore: add Codecov test analytics --- .github/workflows/ci.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ded20028b..c046828b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: poetry install --extras docs - name: "Run pre-commit hooks" run: | - poetry run pre-commit run --all-files --verbose + poetry run pre-commit run --all-files --verbose tests: name: "Python ${{ matrix.python-version}} on ${{ matrix.os }}" @@ -52,9 +52,14 @@ jobs: poetry install --all-extras - name: "Run tests" run: | - poetry run pytest --cov miio --cov-report xml + poetry run pytest --cov miio --cov-report xml --junitxml=junit.xml -o junit_family=legacy + - name: Upload test results to Codecov + if: ${{ !cancelled() }} # Run even if tests fail + uses: codecov/test-results-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} - name: "Upload coverage to Codecov" - uses: "codecov/codecov-action@v4" + uses: "codecov/codecov-action@v5" with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }}