Daily Blockchain Tests #369
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Daily Blockchain Tests | |
on: | |
schedule: | |
- 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 | |
type: string | |
failed_constraint: | |
description: Specific module constrain pair to filter from failed tests | |
required: false | |
type: string | |
commit: | |
description: Commit to download artifact from | |
required: false | |
type: string | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
blockchain-reference-tests: | |
runs-on: [ubuntu-latest-128] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: get-branch-name | |
id: extract_branch | |
run: | | |
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 21 | |
distribution: temurin | |
- name: Setup Go Corset | |
uses: ./.github/actions/setup-go-corset | |
- name: Generate block chain reference tests | |
run: ./gradlew :reference-tests:generateBlockchainReferenceTests -Dorg.gradle.caching=true | |
env: | |
JAVA_OPTS: -Dorg.gradle.daemon=false | |
CORSET_FLAGS: fields,expand,expand,expand | |
- name: Download artifact | |
uses: dawidd6/action-download-artifact@v6 | |
if: ${{ inputs.failed_module != '' }} | |
with: | |
name: failedBlockchainReferenceTests.json | |
path: ${{ github.workspace }}/tmp/${{ steps.extract_branch.outputs.branch }}/ | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
commit: ${{ inputs.commit || '' }} | |
if_no_artifact_found: ignore | |
- name: Rename filter input file | |
if: ${{ inputs.failed_module != '' }} | |
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 -Dblockchain=Ethereum referenceBlockchainTests -x spotlessCheck --tests "${{ inputs.test_filter || 'BlockchainReferenceTest_*' }}" | |
timeout-minutes: 360 | |
env: | |
REFERENCE_TESTS_PARALLELISM: 2 | |
JAVA_OPTS: -Dorg.gradle.daemon=false | |
CORSET_FLAGS: disable | |
GOCORSET_FLAGS: -wd --ansi-escapes=false --report --air | |
FAILED_TEST_JSON_DIRECTORY: ${{ github.workspace }}/tmp/${{ steps.extract_branch.outputs.branch }}/ | |
FAILED_MODULE: ${{ inputs.failed_module || '' }} | |
FAILED_CONSTRAINT: ${{ inputs.failed_constraint || '' }} | |
REFERENCE_TEST_FILTER_INPUT: failedBlockchainReferenceTests.json | |
- name: Upload artifact | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: failedBlockchainReferenceTests.json | |
path: ${{ github.workspace }}/tmp/${{ steps.extract_branch.outputs.branch }}/ | |
- name: Upload test report | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
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/slack-github-action@v2.0.0 | |
with: | |
webhook: ${{ secrets.SLACK_WEBHOOK_URL }} | |
webhook-type: webhook-trigger | |
payload: | | |
name: "Daily Blockchain" | |
status: "${{ env.SUCCESS }} successful, ${{ env.FAILED }} failed, ${{ env.ABORTED }} aborted, ${{ env.DISABLED }} disabled" |