From 13b6301a8650796b009cfb82734f5ec1c69ea7ad Mon Sep 17 00:00:00 2001 From: Jhj Date: Thu, 29 Feb 2024 12:34:10 +0800 Subject: [PATCH] trigger codecov manually --- .github/workflows/codecov.yml | 42 +++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 6 ++--- 2 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 00000000..6a9ce265 --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,42 @@ +# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Test and Upload Coverage + +on: + workflow_dispatch: + +env: + test-requires: "[test,extra]" + test-dir: test + pytest-args: >- + -rap + --durations=20 + --verbose + +jobs: + + tests-pip: + name: Tests (pip, Python ${{ matrix.python-version }}, ${{ matrix.os }}) and Upload Coverage + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ "ubuntu-latest" ] + python-version: [ "3.8" ] + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install --upgrade wheel setuptools + pip install ".${{ env.test-requires }}" + - name: Run tests + run: | + pytest ${{ env.pytest-args }} ${{ env.test-dir }} + - name: Upload coverage reports to Codecov with GitHub Action +# if: ${{ runner.os == 'Linux' && matrix.python-version == 3.8 }} + uses: codecov/codecov-action@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b50cef83..0d1882e2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -49,6 +49,6 @@ jobs: - name: Run tests run: | pytest ${{ env.pytest-args }} ${{ env.test-dir }} - - name: Upload coverage reports to Codecov with GitHub Action - if: ${{ runner.os == 'Linux' && matrix.python-version == 3.8 }} - uses: codecov/codecov-action@v3 +# - name: Upload coverage reports to Codecov with GitHub Action +# if: ${{ runner.os == 'Linux' && matrix.python-version == 3.8 }} +# uses: codecov/codecov-action@v3