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