From 2c648581e5a28313764f73f5fc236326c379f945 Mon Sep 17 00:00:00 2001 From: "Harris.Chu" <1726587+HarrisChu@users.noreply.github.com> Date: Thu, 3 Nov 2022 21:12:59 +0800 Subject: [PATCH] add coverage (#235) * add coverage * fix ignore * add extra line --- .github/workflows/run_test.yaml | 8 ++++++-- codecov.yml | 6 ++++++ requirements/dev.txt | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 codecov.yml diff --git a/.github/workflows/run_test.yaml b/.github/workflows/run_test.yaml index a9195441..7f5aada3 100644 --- a/.github/workflows/run_test.yaml +++ b/.github/workflows/run_test.yaml @@ -33,11 +33,15 @@ jobs: run: | docker-compose -f docker-compose.yaml up -d sleep 45 - pytest -s -v -k "not SSL" + pytest -s -v -k "not SSL" --cov=../nebula3 --cov-report=xml --cov-append working-directory: tests - name: Test SSL connection with pytest run: | enable_ssl=true docker-compose -f docker-compose-ssl.yaml up -d sleep 45 - pytest -s -v -k "SSL" + pytest -s -v -k "SSL" --cov=../nebula3 --cov-report=xml --cov-append working-directory: tests + - name: Upload Coverage to Codecov + uses: codecov/codecov-action@v3 + with: + files: ./tests/coverage.xml diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..d76ac982 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,6 @@ +ignore: + - "nebula3/common" + - "nebula3/fbthrift" + - "nebula3/meta" + - "nebula3/storage" + - "nebula3/graph" diff --git a/requirements/dev.txt b/requirements/dev.txt index 6913f850..48524486 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -34,6 +34,7 @@ wcwidth==0.2.5 # via prettytable wheel==0.37.0 # via pip-tools +pytest-cov==4.0.0 # The following packages are considered to be unsafe in a requirements file: # pip