Skip to content
Open
Show file tree
Hide file tree
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
42 changes: 3 additions & 39 deletions .github/workflows/gradle-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,42 +71,6 @@ jobs:
replay-tests:
if: github.event.pull_request.draft == false && github.base_ref != 'main'
needs: [ build ]
runs-on: gha-runner-scale-set-ubuntu-22.04-amd64-xxl
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
submodules: false

- name: Setup Environment
uses: ./.github/actions/setup-environment
with:
enable-ssh: ${{ inputs.tests-with-ssh }}

- name: Run replay tests
run: GOMEMLIMIT=26GiB ./gradlew :arithmetization:fastReplayTests
env:
JAVA_OPTS: -Dorg.gradle.daemon=false
JUNIT_TESTS_PARALLELISM: 4
GOCORSET_FLAGS: -b1024 -v --ansi-escapes=false --report --air

- name: Upload test report
if: ${{ always() }}
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: replay-tests-report
path: arithmetization/build/reports/tests/**/*

- name: Upload jacoco fast replay tests coverage report
if: always()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: jacoco-fast-replay-tests-coverage-report
path: arithmetization/build/reports/jacoco/jacocoFastReplayTestsReport/**/*

- name: Upload jacoco fast replay tests exec file
if: always()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: jacoco-fast-replay-tests-exec-file
path: arithmetization/build/jacoco/fastReplayTests.exec
uses: ./.github/workflows/reusable-fast-replay-tests.yml
with:
tests-with-ssh: ${{ inputs.tests-with-ssh || false}}
91 changes: 32 additions & 59 deletions .github/workflows/manual-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ on:
required: true
type: string
default: "v1.2.3"
wait-for-tests-bef-publish:
description: 'If "false", the release jar will be published when ready without waiting for the unit and replay tests to pass.'
required: false
type: string
default: 'true'
tests-with-ssh:
description: Run tests with ability to ssh into environment
required: false
type: boolean
default: false

jobs:
# ==================================================================
Expand Down Expand Up @@ -72,27 +82,6 @@ jobs:
# ==================================================================
# Unit Tests
# ==================================================================
unit-tests-london:
needs: [ build ]
uses: ./.github/workflows/reusable-unit-tests.yml
with:
zkevm_fork: LONDON
tests-with-ssh: false

unit-tests-paris:
needs: [ build ]
uses: ./.github/workflows/reusable-unit-tests.yml
with:
zkevm_fork: PARIS
tests-with-ssh: false

unit-tests-shanghai:
needs: [ build ]
uses: ./.github/workflows/reusable-unit-tests.yml
with:
zkevm_fork: SHANGHAI
tests-with-ssh: false

unit-tests-cancun:
needs: [ build ]
uses: ./.github/workflows/reusable-unit-tests.yml
Expand All @@ -112,53 +101,37 @@ jobs:
# ==================================================================
replay-tests:
needs: [ build ]
runs-on: gha-runner-scale-set-ubuntu-22.04-amd64-xxl
uses: ./.github/workflows/reusable-fast-replay-tests.yml
with:
tests-with-ssh: ${{ inputs.tests-with-ssh || false}}

# ==================================================================
# Publish release post tests
# ==================================================================
publish-default:
needs: [ build, unit-tests-prague, replay-tests ]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Publishing Ignores Critical Test Failures

The publish-default job waits for unit-tests-prague and replay-tests but not unit-tests-cancun, even though CANCUN tests are defined and run. This means publishing can proceed even if CANCUN tests fail, which contradicts the PR's intent to make releases conditional on all unit and replay tests passing.

Fix in Cursor Fix in Web

if: ${{ github.event_name != 'pull_request' && ( github.event_name == 'release' || inputs.wait-for-tests-bef-publish == 'true') }}
runs-on: gha-runner-scale-set-ubuntu-22.04-amd64-med
env:
architecture: "amd64"
GRADLE_OPTS: "-Xmx6g -Dorg.gradle.parallel=true -Dorg.gradle.workers.max=4"

steps:
- name: Checkout repository
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
submodules: false

- name: Setup Environment
uses: ./.github/actions/setup-environment
with:
enable-ssh: false

- name: Run replay tests
run: GOMEMLIMIT=26GiB ./gradlew :arithmetization:fastReplayTests
- name: Publish Java artifacts
run: ./gradlew publish
env:
JAVA_OPTS: -Dorg.gradle.daemon=false
JUNIT_TESTS_PARALLELISM: 4
GOCORSET_FLAGS: -b1024 -v --ansi-escapes=false --report --air
ZKEVM_FORK: LONDON

- name: Upload test report
if: ${{ always() }}
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: replay-tests-report
path: arithmetization/build/reports/tests/**/*

- name: Upload jacoco fast replay tests coverage report
if: always()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: jacoco-fast-replay-tests-coverage-report
path: arithmetization/build/reports/jacoco/jacocoFastReplayTestsReport/**/*

- name: Upload jacoco fast replay tests exec file
if: always()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: jacoco-fast-replay-tests-exec-file
path: arithmetization/build/jacoco/fastReplayTests.exec
CLOUDSMITH_USER: ${{ secrets.CLOUDSMITH_USER }}
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}

# ==================================================================
# Publish release post tests
# ==================================================================
publish:
publish-as-soon-as-ready:
needs: [ build ]
if: github.event_name != 'pull_request'
if: ${{ github.event_name != 'pull_request' && inputs.wait-for-tests-bef-publish == 'false'}}
runs-on: gha-runner-scale-set-ubuntu-22.04-amd64-med
env:
architecture: "amd64"
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/reusable-fast-replay-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: "Reusable fast replay tests workflow"
permissions:
contents: read

on:
workflow_call:
inputs:
tests-with-ssh:
required: true
type: boolean

jobs:
# ==================================================================
# Fast replay Tests
# ==================================================================
fast-replay-tests:
runs-on: gha-runner-scale-set-ubuntu-22.04-amd64-xxl
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
submodules: false

- name: Setup Environment
uses: ./.github/actions/setup-environment
with:
enable-ssh: ${{ inputs.tests-with-ssh }}

- name: Run replay tests
run: GOMEMLIMIT=26GiB ./gradlew :arithmetization:fastReplayTests
env:
JAVA_OPTS: -Dorg.gradle.daemon=false
JUNIT_TESTS_PARALLELISM: 4
GOCORSET_FLAGS: -b1024 -v --ansi-escapes=false --report --air

- name: Upload test report
if: ${{ always() }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: replay-tests-report
path: arithmetization/build/reports/tests/**/*

- name: Upload jacoco fast replay tests coverage report
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: jacoco-fast-replay-tests-coverage-report
path: arithmetization/build/reports/jacoco/jacocoFastReplayTestsReport/**/*

- name: Upload jacoco fast replay tests exec file
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: jacoco-fast-replay-tests-exec-file
path: arithmetization/build/jacoco/fastReplayTests.exec
Loading