diff --git a/.github/workflows/py-cli-e2e-tests.yml b/.github/workflows/py-cli-e2e-tests.yml index a812d22b7a3..f2a747fcb47 100644 --- a/.github/workflows/py-cli-e2e-tests.yml +++ b/.github/workflows/py-cli-e2e-tests.yml @@ -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