Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve slack report for daily blockchain tests #1677

Open
wants to merge 2 commits into
base: arith-dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions .github/workflows/reference-blockchain-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
- cron: 0 21 * * 1-5
workflow_dispatch:
inputs:
test_filter:
description: Filter tests to run (via Gradle)
required: false
type: string
default: "BlockchainReferenceTest_*"
failed_module:
description: Specific module to filter from failed tests
required: false
Expand Down Expand Up @@ -63,7 +68,7 @@ jobs:
run: mv ${{ github.workspace }}/tmp/${{ steps.extract_branch.outputs.branch }}/failedBlockchainReferenceTests.json ${{ github.workspace }}/tmp/${{ steps.extract_branch.outputs.branch }}/failedBlockchainReferenceTests-input.json

- name: Run reference blockchain tests
run: GOMEMLIMIT=32GiB ./gradlew referenceBlockchainTests -x spotlessCheck
run: GOMEMLIMIT=32GiB ./gradlew referenceBlockchainTests -x spotlessCheck --tests "${{ inputs.test_filter }}"
timeout-minutes: 360
env:
REFERENCE_TESTS_PARALLELISM: 2
Expand All @@ -89,6 +94,22 @@ jobs:
name: blockchain-refrence-tests-report
path: reference-tests/build/reports/tests/**/*

- name: Extract Metrics
if: ${{ failure() || cancelled() }}
run: |
# Gather metrics
SUCCESS_COUNTER=$(cat $JSON_REPORT | sed -e "s/.*\"successCounter\":\([0-9]*\).*/\1/")
FAILED_COUNTER=$(cat $JSON_REPORT | sed -e "s/.*\"failedCounter\":\([0-9]*\).*/\1/")
ABORTED_COUNTER=$(cat $JSON_REPORT | sed -e "s/.*\"abortedCounter\":\([0-9]*\).*/\1/")
DISABLED_COUNTER=$(cat $JSON_REPORT | sed -e "s/.*\"disabledCounter\":\([0-9]*\).*/\1/")
# Set environment variables
echo "SUCCESS=$SUCCESS_COUNTER" >> $GITHUB_ENV
echo "FAILED=$FAILED_COUNTER" >> $GITHUB_ENV
echo "ABORTED=$ABORTED_COUNTER" >> $GITHUB_ENV
echo "DISABLED=$DISABLED_COUNTER" >> $GITHUB_ENV
env:
JSON_REPORT: ${{ github.workspace }}/tmp/${{ steps.extract_branch.outputs.branch }}/BlockchainReferenceTestOutcome.json

- name: Failure Notification
if: ${{ failure() || cancelled() }}
uses: slackapi/[email protected]
Expand All @@ -97,4 +118,4 @@ jobs:
webhook-type: webhook-trigger
payload: |
name: "Daily Blockchain"
status: "${{ job.status }}"
status: "${{ env.SUCCESS }} successful, ${{ env.FAILED }} failed, ${{ env.ABORTED }} aborted, ${{ env.DISABLED }} disabled"
Loading