Skip to content

Commit 5b9fce8

Browse files
committed
feat: reusable workflow and nighlty for all forks no replay
1 parent 75d1f82 commit 5b9fce8

File tree

3 files changed

+132
-49
lines changed

3 files changed

+132
-49
lines changed

.github/workflows/gradle-nightly-tests.yml

Lines changed: 39 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -10,52 +10,42 @@ concurrency:
1010
cancel-in-progress: true
1111

1212
jobs:
13-
nightly-tests:
14-
runs-on: gha-runner-scale-set-ubuntu-22.04-amd64-xxl
15-
steps:
16-
- name: Checkout repository
17-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
18-
with:
19-
submodules: recursive
20-
21-
- name: Setup Test Environment
22-
uses: ./.github/actions/setup-environment
23-
24-
- name: Run Nightly tests
25-
run: GOMAXPROCS=10 GOMEMLIMIT=20GiB ./gradlew nightlyTests
26-
env:
27-
JAVA_OPTS: -Dorg.gradle.daemon=false
28-
GOCORSET_FLAGS: -v --ansi-escapes=false --report --mir
29-
NIGHTLY_TESTS_PARALLELISM: 2
30-
ZKEVM_FORK: LONDON
31-
32-
- name: Upload test report
33-
if: ${{ always() }}
34-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
35-
with:
36-
name: nightly-tests-report-LONDON
37-
path: arithmetization/build/reports/tests/**/*
38-
39-
- name: Upload jacoco nightly tests coverage report
40-
if: always()
41-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
42-
with:
43-
name: jacoco-nightly-tests-coverage-report-LONDON
44-
path: arithmetization/build/reports/jacoco/jacocoNightlyTestsReport/**/*
45-
46-
- name: Upload jacoco nightly tests exec file
47-
if: always()
48-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
49-
with:
50-
name: jacoco-nightly-tests-exec-file-LONDON
51-
path: arithmetization/build/jacoco/nightlyTests.exec
52-
53-
- name: Failure Notification
54-
if: github.ref == 'refs/heads/arith-dev' && (failure() || cancelled())
55-
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
56-
with:
57-
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
58-
webhook-type: webhook-trigger
59-
payload: |
60-
name: "Nightly"
61-
status: "${{ job.status }}"
13+
nightly-tests-london:
14+
uses: ./.github/workflows/reusable-nightly-tests.yml
15+
secrets: inherit
16+
with:
17+
zkevm_fork: LONDON
18+
tests-with-ssh: ${{ inputs.tests-with-ssh || false }}
19+
with-replays: true
20+
21+
nightly-tests-paris:
22+
uses: ./.github/workflows/reusable-nightly-tests.yml
23+
secrets: inherit
24+
with:
25+
zkevm_fork: PARIS
26+
tests-with-ssh: ${{ inputs.tests-with-ssh || false }}
27+
with-replays: false
28+
29+
nightly-tests-shanghai:
30+
uses: ./.github/workflows/reusable-nightly-tests.yml
31+
secrets: inherit
32+
with:
33+
zkevm_fork: SHANGHAI
34+
tests-with-ssh: ${{ inputs.tests-with-ssh || false }}
35+
with-replays: false
36+
37+
nightly-tests-cancun:
38+
uses: ./.github/workflows/reusable-nightly-tests.yml
39+
secrets: inherit
40+
with:
41+
zkevm_fork: CANCUN
42+
tests-with-ssh: ${{ inputs.tests-with-ssh || false }}
43+
with-replays: false
44+
45+
nightly-tests-prague:
46+
uses: ./.github/workflows/reusable-nightly-tests.yml
47+
secrets: inherit
48+
with:
49+
zkevm_fork: PRAGUE
50+
tests-with-ssh: ${{ inputs.tests-with-ssh || false }}
51+
with-replays: false
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: "Reusable nightly tests workflow"
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
zkevm_fork:
7+
required: true
8+
type: string
9+
with-replays:
10+
required: true
11+
type: boolean
12+
tests-with-ssh:
13+
required: true
14+
type: boolean
15+
16+
jobs:
17+
# ==================================================================
18+
# Nightly Tests
19+
# ==================================================================
20+
nightly-tests:
21+
runs-on: gha-runner-scale-set-ubuntu-22.04-amd64-xxl
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
25+
with:
26+
submodules: recursive
27+
28+
- name: Setup Test Environment
29+
uses: ./.github/actions/setup-environment
30+
31+
- name: Run Nightly tests
32+
run: GOMAXPROCS=10 GOMEMLIMIT=20GiB ./gradlew nightlyTests
33+
if : ${{ inputs.with-replays == true }}
34+
env:
35+
JAVA_OPTS: -Dorg.gradle.daemon=false
36+
GOCORSET_FLAGS: -v --ansi-escapes=false --report --mir
37+
NIGHTLY_TESTS_PARALLELISM: 2
38+
ZKEVM_FORK: ${{ inputs.zkevm_fork }}
39+
40+
- name: Run Nightly No Replay tests
41+
run: GOMAXPROCS=10 GOMEMLIMIT=20GiB ./gradlew nightlyNoReplayTests
42+
if : ${{ inputs.with-replays == false }}
43+
env:
44+
JAVA_OPTS: -Dorg.gradle.daemon=false
45+
GOCORSET_FLAGS: -v --ansi-escapes=false --report --mir
46+
NIGHTLY_TESTS_PARALLELISM: 2
47+
ZKEVM_FORK: ${{ inputs.zkevm_fork }}
48+
49+
- name: Upload test report
50+
if: ${{ always() }}
51+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
52+
with:
53+
name: nightly-tests-report-${{ inputs.zkevm_fork }}
54+
path: arithmetization/build/reports/tests/**/*
55+
56+
- name: Upload jacoco nightly tests coverage report
57+
if: always()
58+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
59+
with:
60+
name: jacoco-nightly-tests-coverage-report-${{ inputs.zkevm_fork }}
61+
path: arithmetization/build/reports/jacoco/jacocoNightlyTestsReport/**/*
62+
63+
- name: Upload jacoco nightly tests exec file
64+
if: always()
65+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
66+
with:
67+
name: jacoco-nightly-tests-exec-file-${{ inputs.zkevm_fork }}
68+
path: arithmetization/build/jacoco/nightlyTests.exec
69+
70+
- name: Failure Notification
71+
if: github.ref == 'refs/heads/arith-dev' && (failure() || cancelled())
72+
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
73+
with:
74+
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
75+
webhook-type: webhook-trigger
76+
payload: |
77+
name: "Nightly"
78+
status: "${{ job.status }}"

gradle/tests.gradle

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,21 @@ tasks.register("nightlyReplayTests", Test) {
293293
}
294294
}
295295

296+
tasks.register("nightlyNoReplayTests", Test) {
297+
systemProperty("junit.jupiter.execution.parallel.enabled", true)
298+
systemProperty("junit.jupiter.execution.parallel.mode.default", "concurrent")
299+
systemProperty("junit.jupiter.execution.parallel.mode.classes.default", "concurrent")
300+
systemProperty("junit.jupiter.execution.parallel.config.strategy", "fixed")
301+
systemProperty("junit.jupiter.execution.parallel.config.fixed.parallelism",
302+
System.getenv().getOrDefault("NIGHTLY_TESTS_PARALLELISM", "1").toInteger())
303+
304+
useJUnitPlatform {
305+
includeTags("nightly")
306+
excludeTags("replay")
307+
}
308+
finalizedBy(jacocoNightlyTestsReport)
309+
}
310+
296311
tasks.register("nightlyTests", Test) {
297312
systemProperty("junit.jupiter.execution.parallel.enabled", true)
298313
systemProperty("junit.jupiter.execution.parallel.mode.default", "concurrent")

0 commit comments

Comments
 (0)