Skip to content

Commit

Permalink
added install dependency test (#1353)
Browse files Browse the repository at this point in the history
  • Loading branch information
supertick authored Oct 13, 2023
1 parent c9dd10f commit 1d3f6a1
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
24 changes: 22 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
Expand All @@ -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
'''
}
}
Expand Down
13 changes: 13 additions & 0 deletions src/test/java/org/myrobotlab/framework/DependencyTest.java
Original file line number Diff line number Diff line change
@@ -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 !");
}

}

0 comments on commit 1d3f6a1

Please sign in to comment.