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

Add CI job for weekly tests #1329

Merged
merged 1 commit into from
Oct 1, 2024
Merged
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
90 changes: 90 additions & 0 deletions .github/workflows/gradle-weekly-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Nightly Tests

on:
schedule:
- cron: "0 4 * * 1"
workflow_dispatch:

env:
CARGO_NET_GIT_FETCH_WITH_CLI: true

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: |
${{ secrets.CONSTRAINTS_SSH_KEY }}

- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 21
distribution: temurin

- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Install Corset
run: RUSTFLAGS=-Awarnings cargo install --git ssh://git@github.com/ConsenSys/corset --tag v9.7.13 --locked --force

- name: Run Weekly tests
run: ./gradlew weeklyTests
env:
JAVA_OPTS: -Dorg.gradle.daemon=false
CORSET_FLAGS: fields,expand,expand,expand
WEEKLY_TESTS_PARALLELISM: 4

- name: Upload test report
if: always()
uses: actions/upload-artifact@v3
with:
name: nightly-tests-report
path: build/reports/tests/**/*

go-corset-tests:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: |
${{ secrets.CONSTRAINTS_SSH_KEY }}
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 21
distribution: temurin

- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Install Corset
run: RUSTFLAGS=-Awarnings cargo install --git ssh://git@github.com/ConsenSys/corset --tag v9.7.13 --locked --force

- name: Install Go
uses: actions/setup-go@v4

- name: Install Go Corset
run:
go install github.com/consensys/go-corset/cmd/go-corset@latest

- name: Run Weekly tests
run: GOMEMLIMIT=196GiB ./gradlew weeklyTests
env:
JAVA_OPTS: -Dorg.gradle.daemon=false
CORSET_FLAGS: disable
GOCORSET_FLAGS: -wd --ansi-escapes=false --report --air
WEEKLY_TESTS_PARALLELISM: 4

18 changes: 18 additions & 0 deletions gradle/tests.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ tasks.test.configure {
useJUnitPlatform {
excludeTags("nightly")
excludeTags("replay")
excludeTags("weekly")
}
}

Expand All @@ -136,6 +137,7 @@ tasks.register("fastReplayTests", Test) {
useJUnitPlatform {
includeTags("replay")
excludeTags("nightly")
excludeTags("weekly")
}
}

Expand Down Expand Up @@ -173,3 +175,19 @@ tasks.register("nightlyTests", Test) {
includeTags("nightly")
}
}

tasks.register("weeklyTests", Test) {
systemProperty("junit.jupiter.execution.parallel.enabled", true)
systemProperty("junit.jupiter.execution.parallel.mode.default", "concurrent")
systemProperty("junit.jupiter.execution.parallel.mode.classes.default", "concurrent")
systemProperty("junit.jupiter.execution.parallel.config.strategy", "fixed")
systemProperty("junit.jupiter.execution.parallel.config.fixed.parallelism",
System.getenv().getOrDefault("WEEKLY_TESTS_PARALLELISM", "1").toInteger())

useJUnitPlatform {
excludeTags("nightly")
excludeTags("replay")
includeTags("weekly")
}
}

Loading