This is an automated email from the ASF dual-hosted git repository.

toulmean pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-tuweni.git


The following commit(s) were added to refs/heads/main by this push:
     new 1b3edb50 try to run reference tests separately
     new 83066420 Merge pull request #410 from atoulme/try_reference_tests
1b3edb50 is described below

commit 1b3edb509fcb24a82dc4ecf7fc54025a9a3f4cc6
Author: Antoine Toulme <anto...@lunar-ocean.com>
AuthorDate: Tue May 31 19:40:34 2022 -0700

    try to run reference tests separately
---
 .github/workflows/test_referencetests.yml          | 57 ++++++++++++++++++++++
 evm/build.gradle                                   | 23 +++++++++
 .../org/apache/tuweni/evm/EVMReferenceTest.kt      |  2 +
 .../org/apache/tuweni/evm/EvmCertificationTest.kt  |  2 +
 .../kotlin/org/apache/tuweni/evm/OpcodeTest.kt     |  2 +
 5 files changed, 86 insertions(+)

diff --git a/.github/workflows/test_referencetests.yml 
b/.github/workflows/test_referencetests.yml
new file mode 100644
index 00000000..7395c755
--- /dev/null
+++ b/.github/workflows/test_referencetests.yml
@@ -0,0 +1,57 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: reference tests
+
+on:
+  push:
+    branches: [ main ]
+  pull_request:
+    branches: [ main ]
+
+jobs:
+  test:
+    timeout-minutes: 30
+    runs-on: ubuntu-latest
+    container:
+      image: tmio/tuweni-build:1.1
+      options: --user 1001
+    steps:
+      - uses: actions/checkout@v1
+        with:
+          submodules: true
+      - name: Cache Gradle packages
+        uses: actions/cache@v1
+        with:
+          path: ~/.gradle/caches
+          key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
+          restore-keys: ${{ runner.os }}-gradle
+      - name: Cache Maven Repository
+        uses: actions/cache@v1
+        with:
+          path: ~/.m2
+          key: ${{ runner.os }}-m2-${{ 
hashFiles('**/dependency-versions.gradle') }}
+          restore-keys: ${{ runner.os }}-m2
+      - name: gradle evm:referenceTest
+        run: ./gradlew evm:referenceTest
+      - name: Archive Junit Report
+        if: always()
+        uses: actions/upload-artifact@v2
+        with:
+          name: junit-report
+          path: '**/build/reports/tests/**'
+          retention-days: 5
\ No newline at end of file
diff --git a/evm/build.gradle b/evm/build.gradle
index 61c99bed..7ae2755f 100644
--- a/evm/build.gradle
+++ b/evm/build.gradle
@@ -10,6 +10,11 @@
  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
express or implied. See the License for the
  * specific language governing permissions and limitations under the License.
  */
+
+plugins {
+  id "java"
+}
+
 description = 'Ethereum Virtual Machine implementation'
 
 dependencies {
@@ -46,3 +51,21 @@ dependencies {
   testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
   testRuntimeOnly 'ch.qos.logback:logback-classic'
 }
+
+def test = tasks.named("test") {
+  useJUnitPlatform {
+    excludeTags "referenceTest"
+  }
+}
+
+tasks.register("referenceTest", Test) {
+  description = 'Runs reference tests.'
+  group = 'verification'
+  shouldRunAfter test
+}
+
+def referenceTest = tasks.named("referenceTest") {
+  useJUnitPlatform {
+    includeTags "referenceTest"
+  }
+}
diff --git a/evm/src/test/kotlin/org/apache/tuweni/evm/EVMReferenceTest.kt 
b/evm/src/test/kotlin/org/apache/tuweni/evm/EVMReferenceTest.kt
index 1e878e77..b55c7d31 100644
--- a/evm/src/test/kotlin/org/apache/tuweni/evm/EVMReferenceTest.kt
+++ b/evm/src/test/kotlin/org/apache/tuweni/evm/EVMReferenceTest.kt
@@ -46,6 +46,7 @@ import org.junit.jupiter.api.Assertions.assertNotEquals
 import org.junit.jupiter.api.Assertions.assertNotNull
 import org.junit.jupiter.api.Assertions.assertTrue
 import org.junit.jupiter.api.BeforeEach
+import org.junit.jupiter.api.Tag
 import org.junit.jupiter.api.extension.ExtendWith
 import org.junit.jupiter.params.ParameterizedTest
 import org.junit.jupiter.params.provider.Arguments
@@ -55,6 +56,7 @@ import java.io.InputStream
 import java.io.UncheckedIOException
 import java.util.stream.Stream
 
+@Tag("referenceTest")
 @ExtendWith(LuceneIndexWriterExtension::class, BouncyCastleExtension::class)
 class EVMReferenceTest {
 
diff --git a/evm/src/test/kotlin/org/apache/tuweni/evm/EvmCertificationTest.kt 
b/evm/src/test/kotlin/org/apache/tuweni/evm/EvmCertificationTest.kt
index 40ad4066..edcebb16 100644
--- a/evm/src/test/kotlin/org/apache/tuweni/evm/EvmCertificationTest.kt
+++ b/evm/src/test/kotlin/org/apache/tuweni/evm/EvmCertificationTest.kt
@@ -44,6 +44,7 @@ import org.junit.jupiter.api.Assertions
 import org.junit.jupiter.api.Assertions.assertEquals
 import org.junit.jupiter.api.Assertions.assertTrue
 import org.junit.jupiter.api.BeforeEach
+import org.junit.jupiter.api.Tag
 import org.junit.jupiter.api.extension.ExtendWith
 import org.junit.jupiter.params.ParameterizedTest
 import org.junit.jupiter.params.provider.Arguments
@@ -53,6 +54,7 @@ import java.io.InputStream
 import java.io.UncheckedIOException
 import java.util.stream.Stream
 
+@Tag("referenceTest")
 @ExtendWith(LuceneIndexWriterExtension::class, BouncyCastleExtension::class)
 class EvmCertificationTest {
   companion object {
diff --git a/evm/src/test/kotlin/org/apache/tuweni/evm/OpcodeTest.kt 
b/evm/src/test/kotlin/org/apache/tuweni/evm/OpcodeTest.kt
index 8f1015d4..dd772551 100644
--- a/evm/src/test/kotlin/org/apache/tuweni/evm/OpcodeTest.kt
+++ b/evm/src/test/kotlin/org/apache/tuweni/evm/OpcodeTest.kt
@@ -44,6 +44,7 @@ import org.junit.jupiter.api.Assertions
 import org.junit.jupiter.api.Assertions.assertEquals
 import org.junit.jupiter.api.Assertions.assertTrue
 import org.junit.jupiter.api.BeforeEach
+import org.junit.jupiter.api.Tag
 import org.junit.jupiter.api.extension.ExtendWith
 import org.junit.jupiter.params.ParameterizedTest
 import org.junit.jupiter.params.provider.Arguments
@@ -53,6 +54,7 @@ import java.io.InputStream
 import java.io.UncheckedIOException
 import java.util.stream.Stream
 
+@Tag("referenceTest")
 @ExtendWith(LuceneIndexWriterExtension::class, BouncyCastleExtension::class)
 class OpcodeTest {
   companion object {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@tuweni.apache.org
For additional commands, e-mail: commits-h...@tuweni.apache.org

Reply via email to