Skip to content

Commit

Permalink
ci: run tests
Browse files Browse the repository at this point in the history
Signed-off-by: John Eberhard <[email protected]>
Signed-off-by: Jesse Gorzinski <[email protected]>
  • Loading branch information
ThePrez committed Aug 7, 2023
1 parent 7a992b7 commit 04483ec
Showing 1 changed file with 35 additions and 9 deletions.
44 changes: 35 additions & 9 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ jobs:

steps:
- uses: actions/checkout@v3

- name: Get Maven project version
run: |
echo "project_version=$(mvn -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec --file pom-dist.xml)" >> $GITHUB_ENV
cat $GITHUB_ENV
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
Expand All @@ -44,19 +50,39 @@ jobs:
run: ls -l target
- name: Copy dist artifacts to staging directory
run: mkdir staging && cp target/*.jar staging
- name: Set up JDK 17
- name: Upload dist artifacts
uses: actions/upload-artifact@v3
with:
name: Package
path: staging

- name: Create test output file
run: touch test_output.txt

- name: Retrieve test suite
run: wget https://github.com/IBM/JTOpen-test/releases/download/v1.0.2/JTOpen-test-1.0.2.jar -O test.jar

- name: Set up JDK 8 tor testing
uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '8'
distribution: 'temurin'
cache: maven
- name: Clean target
run: rm -r target
- name: Build with Maven (Java 17)
run: mvn -B package --file pom.xml
- name: Upload dist artifacts

- name: Run JDBC UserSpace, DataArea, CommandCall, and Conv tests with Java 8 -- no DDM, takes too long
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

- name: Display test success counts
if: always()
run: grep '=' test_output.txt | grep SUCCESS
- name: Display test failure counts
if: always()
run: grep '=' test_output.txt | grep FAIL

- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: Package
path: staging
name: Tests
path: test_output.txt

0 comments on commit 04483ec

Please sign in to comment.