From 740162c9ca5f8b3cf2466241f16a032bd90e383d Mon Sep 17 00:00:00 2001 From: David Cui Date: Tue, 22 Jun 2021 10:51:55 -0700 Subject: [PATCH 1/2] add codecov to CI workflow Signed-off-by: David Cui --- .codecov.yml | 11 +++++++++++ .github/workflows/sql-test-and-build-workflow.yml | 4 ++++ 2 files changed, 15 insertions(+) create mode 100644 .codecov.yml diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 0000000000..895adc8dc9 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,11 @@ +codecov: + require_ci_to_pass: yes + +coverage: + precision: 2 + round: down + status: + project: + default: + target: 99% # the required coverage value + threshold: 1% # the leniency in hitting the target diff --git a/.github/workflows/sql-test-and-build-workflow.yml b/.github/workflows/sql-test-and-build-workflow.yml index f8708943d8..b106856f0c 100644 --- a/.github/workflows/sql-test-and-build-workflow.yml +++ b/.github/workflows/sql-test-and-build-workflow.yml @@ -35,6 +35,10 @@ jobs: mkdir -p opensearch-sql-builds cp -r ./plugin/build/distributions/*.zip opensearch-sql-builds/ + # This step uses the codecov-action Github action: https://github.com/codecov/codecov-action + - name: Upload SQL Coverage Report + uses: codecov/codecov-action@v1 + - name: Upload Artifacts uses: actions/upload-artifact@v1 with: From 475b56db53db1621b0939412426e32ebf58ae5dd Mon Sep 17 00:00:00 2001 From: David Cui Date: Wed, 23 Jun 2021 14:46:27 -0700 Subject: [PATCH 2/2] add codecov token Signed-off-by: David Cui --- .github/workflows/sql-test-and-build-workflow.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/sql-test-and-build-workflow.yml b/.github/workflows/sql-test-and-build-workflow.yml index b106856f0c..8ad294d853 100644 --- a/.github/workflows/sql-test-and-build-workflow.yml +++ b/.github/workflows/sql-test-and-build-workflow.yml @@ -38,6 +38,8 @@ jobs: # This step uses the codecov-action Github action: https://github.com/codecov/codecov-action - name: Upload SQL Coverage Report uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} - name: Upload Artifacts uses: actions/upload-artifact@v1