Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcl committed Aug 12, 2024
1 parent 67fa16d commit 851b8ec
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ runner-test-matrix:
test_env_type: docker
runs_on: ubuntu-latest
workflows:
- Run PR E2E Tests 3
- Run PR E2E Tests 2
- Run Nightly E2E Tests
test_cmd: cd integration-tests/smoke && go test -test.run ^TestLogPollerWithChaosFixedDepth$ -test.parallel=1 -timeout 30m -count=1 -json
pyroscope_env: ci-smoke-log_poller-evm-simulated
Expand Down Expand Up @@ -836,7 +836,7 @@ runner-test-matrix:
test_env_type: docker
runs_on: ubuntu-latest
workflows:
- Run PR E2E Tests 2
- Run PR E2E Tests 3
- Run Nightly E2E Tests
test_cmd: cd integration-tests/migration && go test upgrade_version_test.go -timeout 30m -count=1 -test.parallel=2 -json
test_inputs:
Expand Down
28 changes: 25 additions & 3 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,34 @@ jobs:
AWS_API_GW_HOST_GRAFANA: ${{ secrets.AWS_API_GW_HOST_GRAFANA }}
SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }}

send-slack-notification-for-migration-tests:
name: Send Slack Notification for Migration Tests
check-e2e-test-results:
name: Check E2E test results
runs-on: ubuntu-latest
needs: call-run-e2e-tests-workflow
steps:
- run: echo ${{ needs.call-run-e2e-tests-workflow.outputs.test_results }}
- name: Check test results
id: check_results
run: |
test_results='${{ needs.call-run-e2e-tests-workflow.outputs.test_results }}'
echo "Test Results: $test_results"
# Use jq to determine if notification should be sent
result=$(echo $test_results | jq '[.[] | select(.id == "integration-tests/migration/upgrade_version_test.go:*" ) | select(.result != "success")] | length > 0')
echo "send_node_migration_tests_failed_notification=$result" >> $GITHUB_OUTPUT
- name: Send slack notification for failed migration tests
if: ${{ steps.check_results.outputs.send_node_migration_tests_failed_notification == 'true' }}
run: |
echo "Sending notification due to test failure"
# - name: Notify Slack
# if: failure() && github.event_name != 'workflow_dispatch'
# uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0
# env:
# SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }}
# with:
# channel-id: "#team-test-tooling-internal"
# slack-message: ":x: :mild-panic-intensifies: Node Migration Tests Failed: \n${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}\n${{ format('Notifying <!subteam^{0}|{0}>', secrets.GUARDIAN_SLACK_NOTIFICATION_HANDLE) }}"


# eth-smoke-tests-matrix-automation:
# if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/run-e2e-tests-reusable-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -503,16 +503,16 @@ jobs:
- name: Record test result
if: ${{ always() }}
run: |
id=${{ matrix.tests.id_sanitized }}
id=${{ matrix.tests.id }}
result="${{ steps.run_tests.outcome }}"
echo "{\"id\": \"$id\", \"result\": \"$result\"}" > test_result.json
- name: Upload test result as artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: test_result_${{ matrix.tests.id_sanitized }}
path: test_result.json

retention-days: 1

# TODO: move to run-tests GHA
- name: Print failed test summary
Expand Down Expand Up @@ -645,7 +645,7 @@ jobs:
DEFAULT_PYROSCOPE_ENABLED: ${{ matrix.tests.pyroscope_env != '' && 'true' || '' }}

- name: Upload test log as Github artifact
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
if: inputs.test_log_upload_on_failure && failure()
with:
name: test_log_${{ matrix.tests.id_sanitized }}
Expand Down

0 comments on commit 851b8ec

Please sign in to comment.