From a9122b5afa2c9df228b2fb198fb9da28c7048216 Mon Sep 17 00:00:00 2001 From: HarrisChu <1726587+HarrisChu@users.noreply.github.com> Date: Tue, 1 Nov 2022 16:51:04 +0800 Subject: [PATCH 1/3] add coverage --- .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..d3a7b922 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,6 @@ +ignore: + - "nebula3/common" + - "nebula3/fbthrift" + - "nebula3/meta" + - "nebula3/storage" + - "nebula3/graph" \ No newline at end of file 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 From cbb64469f73ad5f4cb6d71c4afb79c7cabee943f Mon Sep 17 00:00:00 2001 From: HarrisChu <1726587+HarrisChu@users.noreply.github.com> Date: Tue, 1 Nov 2022 17:43:34 +0800 Subject: [PATCH 2/3] fix ignore --- codecov.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/codecov.yml b/codecov.yml index d3a7b922..44198775 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,6 +1,6 @@ ignore: - - "nebula3/common" - - "nebula3/fbthrift" - - "nebula3/meta" - - "nebula3/storage" - - "nebula3/graph" \ No newline at end of file + - "nebula3/common/**/*" + - "nebula3/fbthrift/**/*" + - "nebula3/meta/**/*" + - "nebula3/storage/**/*" + - "nebula3/graph/**/*" \ No newline at end of file From 6e1c8f848252fbd360e9b65bc16f54f4ccad19bc Mon Sep 17 00:00:00 2001 From: HarrisChu <1726587+HarrisChu@users.noreply.github.com> Date: Thu, 3 Nov 2022 09:43:52 +0800 Subject: [PATCH 3/3] add extra line --- codecov.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/codecov.yml b/codecov.yml index 44198775..d76ac982 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,6 +1,6 @@ ignore: - - "nebula3/common/**/*" - - "nebula3/fbthrift/**/*" - - "nebula3/meta/**/*" - - "nebula3/storage/**/*" - - "nebula3/graph/**/*" \ No newline at end of file + - "nebula3/common" + - "nebula3/fbthrift" + - "nebula3/meta" + - "nebula3/storage" + - "nebula3/graph"