diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a597287..366fec0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,10 @@ name: CI -on: [push, pull_request] +on: + push: + branches: [main, master] + pull_request: + # Run on all pull requests regardless of source branch jobs: python: @@ -57,14 +61,25 @@ jobs: run: poetry run pytest tests - name: Upload coverage reports - if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' + # Only upload coverage if we have a token (skip for Dependabot PRs) + if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' && (github.event_name != 'pull_request' || github.actor != 'dependabot[bot]') uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage.xml flags: unittests name: python-sdk - fail_ci_if_error: true + fail_ci_if_error: false + + - name: Upload coverage reports (tokenless) + # Use tokenless upload for Dependabot PRs + if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' && github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' + uses: codecov/codecov-action@v4 + with: + files: ./coverage.xml + flags: unittests + name: python-sdk + fail_ci_if_error: false - name: Upload coverage artifacts if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' diff --git a/poetry.lock b/poetry.lock index 93f36f5..7a4a0b9 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1386,14 +1386,14 @@ test = ["aioresponses (>=0.6.2)", "coverage (>=4.2)", "parametrize (>=0.1.1)", " [[package]] name = "urllib3" -version = "2.2.2" +version = "2.5.0" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main", "dev"] files = [ - {file = "urllib3-2.2.2-py3-none-any.whl", hash = "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472"}, - {file = "urllib3-2.2.2.tar.gz", hash = "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168"}, + {file = "urllib3-2.5.0-py3-none-any.whl", hash = "sha256:e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc"}, + {file = "urllib3-2.5.0.tar.gz", hash = "sha256:3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760"}, ] [package.extras]