From 2845821989200364fc0e4b2eb3bc73ebd6066da4 Mon Sep 17 00:00:00 2001 From: JP-Ellis Date: Thu, 19 Sep 2024 18:53:41 +1000 Subject: [PATCH] chore(ci): add codecov Signed-off-by: JP-Ellis --- .github/codecov.yml | 4 ++++ .github/workflows/test.yml | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 .github/codecov.yml diff --git a/.github/codecov.yml b/.github/codecov.yml new file mode 100644 index 000000000..a29ce9979 --- /dev/null +++ b/.github/codecov.yml @@ -0,0 +1,4 @@ +coverage: + precision: 0 + round: down + range: "60...85" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f9a9041ca..560f7d12f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -111,11 +111,11 @@ jobs: run: hatch run test --broker-url=http://pactbroker:pactbroker@localhost:9292 --container - name: Upload coverage - # TODO: Configure code coverage monitoring - if: false && matrix.python-version == env.STABLE_PYTHON_VERSION && matrix.os == 'ubuntu-latest' + if: matrix.python-version == env.STABLE_PYTHON_VERSION && matrix.os == 'ubuntu-latest' uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4 with: token: ${{ secrets.CODECOV_TOKEN }} + flags: tests test-other: name: >- @@ -211,6 +211,12 @@ jobs: run: > hatch run example --broker-url=http://pactbroker:pactbroker@localhost:9292 + - name: Upload coverage + uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + flags: examples + format: name: Format