mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-01 11:09:14 +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
|
||||
|
||||
- name: Start Server and Ingest Sample Data
|
||||
uses: nick-fields/retry@v2.8.3
|
||||
env:
|
||||
INGESTION_DEPENDENCY: "mysql,elasticsearch"
|
||||
run: ./docker/run_local_docker.sh -m no-ui
|
||||
timeout-minutes: 30
|
||||
with:
|
||||
timeout-minutes: 30
|
||||
max_attempts: 2
|
||||
retry_on: error
|
||||
command: ./docker/run_local_docker.sh -m no-ui
|
||||
|
||||
- name: Run Python Tests & record coverage
|
||||
if: matrix.e2e-test == 'python'
|
||||
id: python-e2e-test
|
||||
run: |
|
||||
source env/bin/activate
|
||||
make coverage
|
||||
@ -99,15 +104,16 @@ jobs:
|
||||
run: |
|
||||
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 report --rcfile ingestion/.coveragerc --data-file .coverage.$E2E_TEST || true
|
||||
|
||||
- name: Upload coverage artifact
|
||||
if: matrix.e2e-test == 'python' && steps.e2e-test.outcome == 'success'
|
||||
- name: Upload coverage artifact for Python tests
|
||||
if: matrix.e2e-test == 'python' && steps.python-e2e-test.outcome == 'success'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: coverage-${{ matrix.e2e-test }}
|
||||
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'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
@ -115,7 +121,7 @@ jobs:
|
||||
path: .coverage.${{ matrix.e2e-test }}
|
||||
|
||||
- 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
|
||||
with:
|
||||
name: tests-${{ matrix.e2e-test }}
|
||||
@ -128,7 +134,7 @@ jobs:
|
||||
sudo rm -rf ${PWD}/docker-volume
|
||||
|
||||
- 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
|
||||
with:
|
||||
payload: |
|
||||
@ -140,7 +146,7 @@ jobs:
|
||||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
|
||||
|
||||
- name: Force failure
|
||||
if: steps.e2e-test.outcome != 'success'
|
||||
if: steps.e2e-test.outcome != 'success' || steps.python-e2e-test.outcome != 'success'
|
||||
run: |
|
||||
exit 1
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user