21
21
22
22
steps :
23
23
- uses : actions/checkout@v3
24
+
25
+ - name : Get Maven project version
26
+ run : |
27
+ echo "project_version=$(mvn -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec --file pom-dist.xml)" >> $GITHUB_ENV
28
+ cat $GITHUB_ENV
29
+
24
30
- name : Set up JDK 8
25
31
uses : actions/setup-java@v3
26
32
with :
@@ -44,19 +50,39 @@ jobs:
44
50
run : ls -l target
45
51
- name : Copy dist artifacts to staging directory
46
52
run : mkdir staging && cp target/*.jar staging
47
- - name : Set up JDK 17
53
+ - name : Upload dist artifacts
54
+ uses : actions/upload-artifact@v3
55
+ with :
56
+ name : Package
57
+ path : staging
58
+
59
+ - name : Create test output file
60
+ run : touch test_output.txt
61
+
62
+ - name : Retrieve test suite
63
+ run : wget https://github.com/IBM/JTOpen-test/releases/download/v1.0.2/JTOpen-test-1.0.2.jar -O test.jar
64
+
65
+ - name : Set up JDK 8 tor testing
48
66
uses : actions/setup-java@v3
49
67
with :
50
- java-version : ' 17 '
68
+ java-version : ' 8 '
51
69
distribution : ' temurin'
52
70
cache : maven
53
- - name : Clean target
54
- run : rm -r target
55
- - name : Build with Maven (Java 17)
56
- run : mvn -B package --file pom.xml
57
- - name : Upload dist artifacts
71
+
72
+ - name : Run JDBC UserSpace, DataArea, CommandCall, and Conv tests with Java 8 -- no DDM, takes too long
73
+ run : java -cp staging/jt400-${{ env.project_version }}-java8.jar:test.jar test.RegressionTest -tc JDBC -tc UserSpace -tc DataArea -tc Conv -tc CommandCall -system ${{ secrets.IBMI_TEST_SYS }} -uid ${{ secrets.IBMI_TEST_USER }} -pwd ${{ secrets.IBMI_TEST_PW }} -pwrSys ${{ secrets.IBMI_POWERTEST_USER }},${{ secrets.IBMI_POWERTEST_PW }} > test_output.txt 2>&1
74
+
75
+ - name : Display test success counts
76
+ if : always()
77
+ run : grep '=' test_output.txt | grep SUCCESS
78
+ - name : Display test failure counts
79
+ if : always()
80
+ run : grep '=' test_output.txt | grep FAIL
81
+
82
+ - name : Upload test results
83
+ if : always()
58
84
uses : actions/upload-artifact@v3
59
85
with :
60
- name : Package
61
- path : staging
86
+ name : Tests
87
+ path : test_output.txt
62
88
0 commit comments