mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-03 12:08:31 +00:00
Fix GH acton for E2E CLI tests coverage to Sonar (#9914)
This commit is contained in:
parent
b0f7cc3ca2
commit
67820c359d
22
.github/workflows/py-cli-e2e-tests.yml
vendored
22
.github/workflows/py-cli-e2e-tests.yml
vendored
@ -57,13 +57,18 @@ jobs:
|
|||||||
make install_all install_test
|
make install_all install_test
|
||||||
|
|
||||||
- name: Start Server and Ingest Sample Data
|
- name: Start Server and Ingest Sample Data
|
||||||
|
uses: nick-fields/retry@v2.8.3
|
||||||
env:
|
env:
|
||||||
INGESTION_DEPENDENCY: "mysql,elasticsearch"
|
INGESTION_DEPENDENCY: "mysql,elasticsearch"
|
||||||
run: ./docker/run_local_docker.sh -m no-ui
|
with:
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
|
max_attempts: 2
|
||||||
|
retry_on: error
|
||||||
|
command: ./docker/run_local_docker.sh -m no-ui
|
||||||
|
|
||||||
- name: Run Python Tests & record coverage
|
- name: Run Python Tests & record coverage
|
||||||
if: matrix.e2e-test == 'python'
|
if: matrix.e2e-test == 'python'
|
||||||
|
id: python-e2e-test
|
||||||
run: |
|
run: |
|
||||||
source env/bin/activate
|
source env/bin/activate
|
||||||
make coverage
|
make coverage
|
||||||
@ -99,15 +104,16 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
source env/bin/activate
|
source env/bin/activate
|
||||||
coverage run --rcfile ingestion/.coveragerc --data-file .coverage.$E2E_TEST -a --branch -m pytest -c ingestion/setup.cfg --junitxml=ingestion/junit/test-results-$E2E_TEST.xml --ignore=ingestion/tests/unit/source ingestion/tests/unit ingestion/tests/cli_e2e/test_cli_$E2E_TEST.py
|
coverage run --rcfile ingestion/.coveragerc --data-file .coverage.$E2E_TEST -a --branch -m pytest -c ingestion/setup.cfg --junitxml=ingestion/junit/test-results-$E2E_TEST.xml --ignore=ingestion/tests/unit/source ingestion/tests/unit ingestion/tests/cli_e2e/test_cli_$E2E_TEST.py
|
||||||
|
coverage report --rcfile ingestion/.coveragerc --data-file .coverage.$E2E_TEST || true
|
||||||
|
|
||||||
- name: Upload coverage artifact
|
- name: Upload coverage artifact for Python tests
|
||||||
if: matrix.e2e-test == 'python' && steps.e2e-test.outcome == 'success'
|
if: matrix.e2e-test == 'python' && steps.python-e2e-test.outcome == 'success'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: coverage-${{ matrix.e2e-test }}
|
name: coverage-${{ matrix.e2e-test }}
|
||||||
path: .coverage
|
path: .coverage
|
||||||
|
|
||||||
- name: Upload coverage artifact for Python tests
|
- name: Upload coverage artifact for CLI E2E tests
|
||||||
if: matrix.e2e-test != 'python' && steps.e2e-test.outcome == 'success'
|
if: matrix.e2e-test != 'python' && steps.e2e-test.outcome == 'success'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
@ -115,7 +121,7 @@ jobs:
|
|||||||
path: .coverage.${{ matrix.e2e-test }}
|
path: .coverage.${{ matrix.e2e-test }}
|
||||||
|
|
||||||
- name: Upload tests artifact
|
- name: Upload tests artifact
|
||||||
if: steps.e2e-test.outcome == 'success'
|
if: steps.e2e-test.outcome == 'success' || steps.python-e2e-test.outcome == 'success'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: tests-${{ matrix.e2e-test }}
|
name: tests-${{ matrix.e2e-test }}
|
||||||
@ -128,7 +134,7 @@ jobs:
|
|||||||
sudo rm -rf ${PWD}/docker-volume
|
sudo rm -rf ${PWD}/docker-volume
|
||||||
|
|
||||||
- name: Slack on Failure
|
- name: Slack on Failure
|
||||||
if: steps.e2e-test.outcome != 'success'
|
if: steps.e2e-test.outcome != 'success' || steps.python-e2e-test.outcome != 'success'
|
||||||
uses: slackapi/slack-github-action@v1.23.0
|
uses: slackapi/slack-github-action@v1.23.0
|
||||||
with:
|
with:
|
||||||
payload: |
|
payload: |
|
||||||
@ -140,7 +146,7 @@ jobs:
|
|||||||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
|
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
|
||||||
|
|
||||||
- name: Force failure
|
- name: Force failure
|
||||||
if: steps.e2e-test.outcome != 'success'
|
if: steps.e2e-test.outcome != 'success' || steps.python-e2e-test.outcome != 'success'
|
||||||
run: |
|
run: |
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user