mirror of
https://github.com/apache/superset.git
synced 2026-04-26 19:44:58 +00:00
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:
@@ -1,13 +1,18 @@
|
|||||||
|
codecov:
|
||||||
|
notify:
|
||||||
|
after_n_builds: 4
|
||||||
ignore:
|
ignore:
|
||||||
- "superset/migrations/versions/*.py"
|
- "superset/migrations/versions/*.py"
|
||||||
coverage:
|
coverage:
|
||||||
status:
|
status:
|
||||||
project:
|
project:
|
||||||
|
informational: true
|
||||||
default:
|
default:
|
||||||
# Commits pushed to master should not make the overall
|
# Commits pushed to master should not make the overall
|
||||||
# project coverage decrease:
|
# project coverage decrease:
|
||||||
target: auto
|
target: auto
|
||||||
threshold: 0%
|
threshold: 0%
|
||||||
patch:
|
patch:
|
||||||
|
informational: true
|
||||||
default:
|
default:
|
||||||
threshold: 0%
|
threshold: 0%
|
||||||
|
|||||||
9
.github/workflows/bashlib.sh
vendored
9
.github/workflows/bashlib.sh
vendored
@@ -191,11 +191,6 @@ cypress-run-all() {
|
|||||||
|
|
||||||
cypress-run "*/**/*"
|
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
|
# After job is done, print out Flask log for debugging
|
||||||
say "::group::Flask log for default run"
|
say "::group::Flask log for default run"
|
||||||
cat "$flasklog"
|
cat "$flasklog"
|
||||||
@@ -211,8 +206,10 @@ cypress-run-all() {
|
|||||||
|
|
||||||
cypress-run "sqllab/*" "Backend persist"
|
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
|
# || true to prevent CI failure on codecov upload
|
||||||
codecov -cF "cypress" || true
|
codecov -c -F "cypress" || true
|
||||||
|
|
||||||
say "::group::Flask log for backend persist"
|
say "::group::Flask log for backend persist"
|
||||||
cat "$flasklog"
|
cat "$flasklog"
|
||||||
|
|||||||
2
.github/workflows/superset-frontend.yml
vendored
2
.github/workflows/superset-frontend.yml
vendored
@@ -45,4 +45,4 @@ jobs:
|
|||||||
if: steps.check.outcome == 'failure'
|
if: steps.check.outcome == 'failure'
|
||||||
working-directory: ./superset-frontend
|
working-directory: ./superset-frontend
|
||||||
run: |
|
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
|
- name: Upload code coverage
|
||||||
if: steps.check.outcome == 'failure'
|
if: steps.check.outcome == 'failure'
|
||||||
run: |
|
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:
|
test-postgres-hive:
|
||||||
if: github.event.pull_request.draft == false
|
if: github.event.pull_request.draft == false
|
||||||
@@ -158,4 +158,4 @@ jobs:
|
|||||||
- name: Upload code coverage
|
- name: Upload code coverage
|
||||||
if: steps.check.outcome == 'failure'
|
if: steps.check.outcome == 'failure'
|
||||||
run: |
|
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
|
- name: Upload code coverage
|
||||||
if: steps.check.outcome == 'failure'
|
if: steps.check.outcome == 'failure'
|
||||||
run: |
|
run: |
|
||||||
bash <(curl -s https://codecov.io/bash) -cF python
|
bash <(curl -s https://codecov.io/bash) -c -F python -F mysql
|
||||||
|
|
||||||
test-postgres:
|
test-postgres:
|
||||||
if: github.event.pull_request.draft == false
|
if: github.event.pull_request.draft == false
|
||||||
@@ -134,7 +134,7 @@ jobs:
|
|||||||
- name: Upload code coverage
|
- name: Upload code coverage
|
||||||
if: steps.check.outcome == 'failure'
|
if: steps.check.outcome == 'failure'
|
||||||
run: |
|
run: |
|
||||||
bash <(curl -s https://codecov.io/bash) -cF python
|
bash <(curl -s https://codecov.io/bash) -c -F python -F postgres
|
||||||
|
|
||||||
test-sqlite:
|
test-sqlite:
|
||||||
if: github.event.pull_request.draft == false
|
if: github.event.pull_request.draft == false
|
||||||
@@ -190,4 +190,4 @@ jobs:
|
|||||||
- name: Upload code coverage
|
- name: Upload code coverage
|
||||||
if: steps.check.outcome == 'failure'
|
if: steps.check.outcome == 'failure'
|
||||||
run: |
|
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 "$@"
|
for CHECK in "$@"
|
||||||
do
|
do
|
||||||
if [[ ${CHECK} == "python" ]]; then
|
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"
|
echo "Searching for changes in python files"
|
||||||
elif [[ ${CHECK} == "frontend" ]]; then
|
elif [[ ${CHECK} == "frontend" ]]; then
|
||||||
REGEX="(^superset-frontend\/)"
|
REGEX="(^\.github\/workflows\/.*(frontend|e2e)|^superset-frontend\/)"
|
||||||
echo "Searching for changes in frontend files"
|
echo "Searching for changes in frontend files"
|
||||||
else
|
else
|
||||||
echo "Invalid check: \"${CHECK}\". Falling back to exiting with FAILURE code"
|
echo "Invalid check: \"${CHECK}\". Falling back to exiting with FAILURE code"
|
||||||
|
|||||||
Reference in New Issue
Block a user