From 15ce61e0d83a7db14281f01acfdf0caad689a670 Mon Sep 17 00:00:00 2001 From: Kun Jinkao <45487685+Snoopy1866@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:02:26 +0800 Subject: [PATCH] chore(workflow): use codecov (#24) --- .github/workflows/check.yml | 11 +++++++++-- requirements-dev.txt | 5 +++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index d1efca0..542c865 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,4 +1,4 @@ -name: Lint and Test +name: Lint, Test and Report on: push: @@ -17,12 +17,14 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v4 + - name: Set up Python uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} cache: "pip" cache-dependency-path: "requirements-dev.txt" + - name: Install Dependencies run: | python -m pip install --upgrade pip @@ -34,7 +36,12 @@ jobs: - name: Run Tests run: | - pytest + pytest --cov --cov-report=xml + + - name: Upload results to Codecov + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} report: needs: check diff --git a/requirements-dev.txt b/requirements-dev.txt index 3129fb9..f63629d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,5 @@ scipy>=1.12.0 -pytest==8.3.3 -black==24.8.0 \ No newline at end of file +black==24.8.0 +pytest==8.3.2 +pytest-cov==5.0.0