Skip to content

Commit c8d7796

Browse files
committed
ci: test run-groovy
1 parent c321f05 commit c8d7796

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

.github/workflows/maven.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
retention-days: 1
3838
path: coatjava.tar.gz
3939

40-
test:
40+
test_coatjava:
4141
needs: [ build ]
4242
runs-on: ubuntu-latest
4343
strategy:
@@ -73,3 +73,25 @@ jobs:
7373
run: |
7474
cd validation/advanced-tests
7575
${{matrix.cmd}}
76+
77+
test_run-groovy:
78+
needs: [ build ]
79+
runs-on: ubuntu-latest
80+
steps:
81+
- uses: actions/checkout@v3
82+
- name: Set up JDK
83+
uses: actions/setup-java@v3
84+
with:
85+
java-version: 11
86+
distribution: zulu
87+
- name: setup groovy
88+
uses: wtfjoke/setup-groovy@v1
89+
with:
90+
groovy-version: 4.x
91+
- uses: actions/download-artifact@v3
92+
with:
93+
name: build
94+
- name: untar build
95+
run: tar xzvf coatjava.tar.gz
96+
- name: test run-groovy
97+
run: coatjava/bin/run-groovy validation/advanced-tests/test-run-groovy.groovy
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// simple test to make sure that `run-groovy` is working
2+
3+
// check environment variables
4+
[ 'JYPATH', 'JAVA_OPTS' ].collectEntries{ [it, System.getenv(it)] }.each{ name, val ->
5+
if(val==null) {
6+
System.err.println "ERROR: environment variable $name not set"
7+
System.exit(100)
8+
}
9+
if(val=="") {
10+
System.err.println "ERROR: environment variable $name is set, but empty"
11+
System.exit(100)
12+
}
13+
System.out.println("$name = $val")
14+
}
15+
16+
// try to import a local package
17+
import org.jlab.clas.physics.*

0 commit comments

Comments
 (0)