Skip to content

Commit 04483ec

Browse files
committed
ci: run tests
Signed-off-by: John Eberhard <[email protected]> Signed-off-by: Jesse Gorzinski <[email protected]>
1 parent 7a992b7 commit 04483ec

File tree

1 file changed

+35
-9
lines changed

1 file changed

+35
-9
lines changed

.github/workflows/maven.yml

+35-9
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ jobs:
2121

2222
steps:
2323
- 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+
2430
- name: Set up JDK 8
2531
uses: actions/setup-java@v3
2632
with:
@@ -44,19 +50,39 @@ jobs:
4450
run: ls -l target
4551
- name: Copy dist artifacts to staging directory
4652
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
4866
uses: actions/setup-java@v3
4967
with:
50-
java-version: '17'
68+
java-version: '8'
5169
distribution: 'temurin'
5270
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()
5884
uses: actions/upload-artifact@v3
5985
with:
60-
name: Package
61-
path: staging
86+
name: Tests
87+
path: test_output.txt
6288

0 commit comments

Comments
 (0)