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@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
uses: ./.github/workflows/reusable-fast-replay-tests.yml
with:
tests-with-ssh: ${{ inputs.tests-with-ssh || false}}
93 changes: 27 additions & 66 deletions .github/workflows/manual-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ 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'

jobs:
# ==================================================================
Expand Down Expand Up @@ -72,34 +77,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
with:
zkevm_fork: CANCUN
tests-with-ssh: false

unit-tests-prague:
needs: [ build ]
uses: ./.github/workflows/reusable-unit-tests.yml
Expand All @@ -112,53 +89,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-conditional-to-units-and-replay-tests:
needs: [ build, unit-tests-prague, replay-tests ]
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@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
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
Comment on lines +17 to +55

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI about 15 hours ago

To address the problem, we should explicitly add a permissions block to the workflow. Since all jobs in the workflow only check out the repository, run tests, and upload artifacts, the minimum required is nearly always contents: read. This will prevent the workflow from inheriting more permissive defaults set at the repository or organization level. The permissions block should be added at the top level of the workflow file (just after the name and before on) to apply to all jobs by default. No changes to the workflow steps or additional configuration are required.


Suggested changeset 1
.github/workflows/reusable-fast-replay-tests.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/reusable-fast-replay-tests.yml b/.github/workflows/reusable-fast-replay-tests.yml
--- a/.github/workflows/reusable-fast-replay-tests.yml
+++ b/.github/workflows/reusable-fast-replay-tests.yml
@@ -1,4 +1,6 @@
 name: "Reusable fast replay tests workflow"
+permissions:
+  contents: read
 
 on:
   workflow_call:
EOF
@@ -1,4 +1,6 @@
name: "Reusable fast replay tests workflow"
permissions:
contents: read

on:
workflow_call:
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
Loading