From 3f1ea9129f3b5c1a285a05121fd41819dd071ffb Mon Sep 17 00:00:00 2001 From: grog Date: Thu, 12 Oct 2023 11:40:04 -0700 Subject: [PATCH] added install dependency test --- .github/workflows/build.yml | 4 +++- Jenkinsfile | 24 +++++++++++++++++-- .../myrobotlab/framework/DependencyTest.java | 13 ++++++++++ 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 src/test/java/org/myrobotlab/framework/DependencyTest.java diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bf668124e0..93d82942aa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,5 +15,7 @@ jobs: with: java-version: '11' distribution: 'adopt' + - name: Dependency Test + run: mvn test -Dtest=org.myrobotlab.framework.DependencyTest -q - name: Build with Maven - run: mvn --batch-mode -Dtest=!**/OpenCV* test -X + run: mvn --batch-mode -Dtest=!**/OpenCV* test -q diff --git a/Jenkinsfile b/Jenkinsfile index 85c66205f7..a0e8bed48e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -92,6 +92,26 @@ pipeline { } } // stage compile + stage('dependencies') { + when { + expression { params.verify == 'true' } + } + steps { + script { + // TODO - integration tests ! + if (isUnix()) { + sh ''' + mvn test -Dtest=org.myrobotlab.framework.DependencyTest -q + ''' + } else { + bat ''' + mvn test -Dtest=org.myrobotlab.framework.DependencyTest -q + ''' + } + } + } + } // stage verify + stage('verify') { when { expression { params.verify == 'true' } @@ -101,11 +121,11 @@ pipeline { // TODO - integration tests ! if (isUnix()) { sh ''' - mvn -Dfile.encoding=UTF-8 -Dsurefire.skipAfterFailureCount=1 -DargLine="-Xmx1024m" verify --fail-fast + mvn -Dfile.encoding=UTF-8 -DargLine="-Xmx1024m" verify --fail-fast -q ''' } else { bat ''' - mvn -Dfile.encoding=UTF-8 -Dsurefire.skipAfterFailureCount=1 -DargLine="-Xmx1024m" verify --fail-fast + mvn -Dfile.encoding=UTF-8 -DargLine="-Xmx1024m" verify --fail-fast -q ''' } } diff --git a/src/test/java/org/myrobotlab/framework/DependencyTest.java b/src/test/java/org/myrobotlab/framework/DependencyTest.java new file mode 100644 index 0000000000..4d264d9852 --- /dev/null +++ b/src/test/java/org/myrobotlab/framework/DependencyTest.java @@ -0,0 +1,13 @@ +package org.myrobotlab.framework; + +import org.junit.Test; +import org.myrobotlab.test.AbstractTest; + +public class DependencyTest extends AbstractTest { + + @Test + public void test() { + System.out.println("dependencies were successful !"); + } + +}