mirror of https://github.com/apache/superset.git
test: optimize codecov config (#13329)
* test: optimize codecov config to let GitHub checks always pass * Run tests on workflow changes, too
This commit is contained in:
parent
94d0bb9e7f
commit
d39bc14a0b
|
@ -1,13 +1,18 @@
|
|||
codecov:
|
||||
notify:
|
||||
after_n_builds: 4
|
||||
ignore:
|
||||
- "superset/migrations/versions/*.py"
|
||||
coverage:
|
||||
status:
|
||||
project:
|
||||
informational: true
|
||||
default:
|
||||
# Commits pushed to master should not make the overall
|
||||
# project coverage decrease:
|
||||
target: auto
|
||||
threshold: 0%
|
||||
patch:
|
||||
informational: true
|
||||
default:
|
||||
threshold: 0%
|
||||
|
|
|
@ -191,11 +191,6 @@ cypress-run-all() {
|
|||
|
||||
cypress-run "*/**/*"
|
||||
|
||||
# Upload code coverage separately so each page can have separate flags
|
||||
# -c will clean existing coverage reports, -F means add flags
|
||||
# || true to prevent CI failure on codecov upload
|
||||
codecov -cF "cypress" || true
|
||||
|
||||
# After job is done, print out Flask log for debugging
|
||||
say "::group::Flask log for default run"
|
||||
cat "$flasklog"
|
||||
|
@ -211,8 +206,10 @@ cypress-run-all() {
|
|||
|
||||
cypress-run "sqllab/*" "Backend persist"
|
||||
|
||||
# Upload code coverage separately so each page can have separate flags
|
||||
# -c will clean existing coverage reports, -F means add flags
|
||||
# || true to prevent CI failure on codecov upload
|
||||
codecov -cF "cypress" || true
|
||||
codecov -c -F "cypress" || true
|
||||
|
||||
say "::group::Flask log for backend persist"
|
||||
cat "$flasklog"
|
||||
|
|
|
@ -45,4 +45,4 @@ jobs:
|
|||
if: steps.check.outcome == 'failure'
|
||||
working-directory: ./superset-frontend
|
||||
run: |
|
||||
bash <(curl -s https://codecov.io/bash) -cF javascript
|
||||
bash <(curl -s https://codecov.io/bash) -c -F javascript
|
||||
|
|
|
@ -82,7 +82,7 @@ jobs:
|
|||
- name: Upload code coverage
|
||||
if: steps.check.outcome == 'failure'
|
||||
run: |
|
||||
bash <(curl -s https://codecov.io/bash) -cF python
|
||||
bash <(curl -s https://codecov.io/bash) -c -F python -F presto
|
||||
|
||||
test-postgres-hive:
|
||||
if: github.event.pull_request.draft == false
|
||||
|
@ -158,4 +158,4 @@ jobs:
|
|||
- name: Upload code coverage
|
||||
if: steps.check.outcome == 'failure'
|
||||
run: |
|
||||
bash <(curl -s https://codecov.io/bash) -cF python
|
||||
bash <(curl -s https://codecov.io/bash) -c -F python -F hive
|
||||
|
|
|
@ -70,7 +70,7 @@ jobs:
|
|||
- name: Upload code coverage
|
||||
if: steps.check.outcome == 'failure'
|
||||
run: |
|
||||
bash <(curl -s https://codecov.io/bash) -cF python
|
||||
bash <(curl -s https://codecov.io/bash) -c -F python -F mysql
|
||||
|
||||
test-postgres:
|
||||
if: github.event.pull_request.draft == false
|
||||
|
@ -134,7 +134,7 @@ jobs:
|
|||
- name: Upload code coverage
|
||||
if: steps.check.outcome == 'failure'
|
||||
run: |
|
||||
bash <(curl -s https://codecov.io/bash) -cF python
|
||||
bash <(curl -s https://codecov.io/bash) -c -F python -F postgres
|
||||
|
||||
test-sqlite:
|
||||
if: github.event.pull_request.draft == false
|
||||
|
@ -190,4 +190,4 @@ jobs:
|
|||
- name: Upload code coverage
|
||||
if: steps.check.outcome == 'failure'
|
||||
run: |
|
||||
bash <(curl -s https://codecov.io/bash) -cF python
|
||||
bash <(curl -s https://codecov.io/bash) -c -F python -F sqlite
|
||||
|
|
|
@ -34,10 +34,10 @@ REGEXES=()
|
|||
for CHECK in "$@"
|
||||
do
|
||||
if [[ ${CHECK} == "python" ]]; then
|
||||
REGEX="(^tests\/|^superset\/|^setup\.py|^requirements\/.+\.txt)"
|
||||
REGEX="(^\.github\/workflows\/.*python|^tests\/|^superset\/|^setup\.py|^requirements\/.+\.txt)"
|
||||
echo "Searching for changes in python files"
|
||||
elif [[ ${CHECK} == "frontend" ]]; then
|
||||
REGEX="(^superset-frontend\/)"
|
||||
REGEX="(^\.github\/workflows\/.*(frontend|e2e)|^superset-frontend\/)"
|
||||
echo "Searching for changes in frontend files"
|
||||
else
|
||||
echo "Invalid check: \"${CHECK}\". Falling back to exiting with FAILURE code"
|
||||
|
|
Loading…
Reference in New Issue