From d5a6083bf0e5790f41aa7970956cb7d216711d9b Mon Sep 17 00:00:00 2001 From: Pham Hoang Hung <84316773+phhung-axonivy@users.noreply.github.com> Date: Fri, 2 Aug 2024 16:32:37 +0700 Subject: [PATCH] MARP-626 Fix for Dev Fail on Market-Monitor (#37) --- .github/workflows/ci.yml | 45 ++++++++++++++----- .github/workflows/dev.yml | 4 +- .github/workflows/release.yml | 2 +- sftp-connector-demo/pom.xml | 5 ++- sftp-connector-test/pom.xml | 17 ++++++- .../connector/sftp/test/SftpProcessTest.java | 2 +- sftp-connector/pom.xml | 5 ++- 7 files changed, 63 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 16b0ec0..24865a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,21 +8,27 @@ on: mvnArgs: type: string required: false + javaVersion: + type: number + default: 17 + mvnVersion: + type: string + default: 3.6.3 schedule: - cron: '21 21 * * *' - jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup Java JDK - uses: actions/setup-java@v1.4.3 + uses: actions/setup-java@v4 with: - java-version: 17 + java-version: ${{ inputs.javaVersion || '17' }} + distribution: temurin - name: Install and start SFTP run: | @@ -37,18 +43,37 @@ jobs: echo "adding user to group ${sshGroup}" sudo useradd -s /bin/bash -d /home/usr -m -g ${sshGroup} -p $(echo pwd | openssl passwd -1 -stdin) usr + - name: Setup Maven + uses: stCarolas/setup-maven@v5 + with: + maven-version: ${{ inputs.mvnVersion || '3.6.3' }} + - name: Build with Maven - run: mvn clean verify --batch-mode ${{ inputs.mvnArgs }} + run: mvn clean verify --batch-mode --fail-at-end ${{ inputs.mvnArgs }} - name: Publish Unit Test Results - uses: EnricoMi/publish-unit-test-result-action@v1 + uses: EnricoMi/publish-unit-test-result-action@v2 if: always() with: - files: "*/target/*-reports/TEST*.xml" + junit_files: | + */target/*-reports/*.xml + !*/target/*-reports/failsafe-summary.xml - - name: Archive build artifacts - uses: actions/upload-artifact@v2 + - name: Archive build artifact + uses: actions/upload-artifact@v4 with: path: | */target/*.iar + */target/*-[0-9]*.jar *product/target/*.zip + + - name: Archive test reports + uses: actions/upload-artifact@v4 + if: failure() + with: + name: test-reports + retention-days: 5 + path: | + */target/testEngineOut.log + */target/selenide/* + */target/ivyEngine/deploy/*/*.deploymentLog diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index d55fdca..704f7d7 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -10,4 +10,6 @@ jobs: build: uses: ./.github/workflows/ci.yml with: - mvnArgs: '"-Divy.engine.download.url=https://dev.axonivy.com/permalink/dev/axonivy-engine.zip" "-Divy.engine.version=(10.0.0,]"' + mvnArgs: '"-Divy.engine.download.url=https://dev.axonivy.com/permalink/dev/axonivy-engine.zip" "-Divy.engine.version=(10.0.0,]" "-Dproject.build.plugin.version=11.4.0-SNAPSHOT"' + javaVersion: 21 + mvnVersion: 3.9.8 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 128a183..ab5b0d7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,4 +4,4 @@ on: workflow_dispatch jobs: build: - uses: axonivy-market/github-workflows/.github/workflows/release.yml@v2 + uses: axonivy-market/github-workflows/.github/workflows/release.yml@v4 diff --git a/sftp-connector-demo/pom.xml b/sftp-connector-demo/pom.xml index d1980b8..0317891 100644 --- a/sftp-connector-demo/pom.xml +++ b/sftp-connector-demo/pom.xml @@ -6,6 +6,9 @@ sftp-connector-demo 10.0.1-SNAPSHOT iar + + 10.0.16 + com.axonivy.connector.sftp @@ -31,7 +34,7 @@ com.axonivy.ivy.ci project-build-plugin - 10.0.6 + ${project.build.plugin.version} true diff --git a/sftp-connector-test/pom.xml b/sftp-connector-test/pom.xml index 4e43bcf..f23e041 100644 --- a/sftp-connector-test/pom.xml +++ b/sftp-connector-test/pom.xml @@ -6,6 +6,10 @@ sftp-connector-test 10.0.1-SNAPSHOT iar + + 10.0.16 + 10.0.16 + com.axonivy.connector.sftp @@ -16,7 +20,7 @@ com.axonivy.ivy.test unit-tester - 10.0.0 + ${tester.version} test @@ -32,6 +36,15 @@ https://oss.sonatype.org/content/repositories/snapshots + + + sonatype + https://oss.sonatype.org/content/repositories/snapshots + + always + + + src_test @@ -49,7 +62,7 @@ com.axonivy.ivy.ci project-build-plugin - 10.0.6 + ${project.build.plugin.version} true diff --git a/sftp-connector-test/src_test/com/axonivy/connector/sftp/test/SftpProcessTest.java b/sftp-connector-test/src_test/com/axonivy/connector/sftp/test/SftpProcessTest.java index 70f87cb..e486466 100644 --- a/sftp-connector-test/src_test/com/axonivy/connector/sftp/test/SftpProcessTest.java +++ b/sftp-connector-test/src_test/com/axonivy/connector/sftp/test/SftpProcessTest.java @@ -34,7 +34,7 @@ * Process Testing docs *

*/ -@IvyProcessTest +@IvyProcessTest(enableWebServer = true) public class SftpProcessTest { private static final BpmProcess TEST_HELPER_PROCESS = BpmProcess.path("Sftp/SftpHelper"); diff --git a/sftp-connector/pom.xml b/sftp-connector/pom.xml index ee2c731..119c50d 100644 --- a/sftp-connector/pom.xml +++ b/sftp-connector/pom.xml @@ -6,6 +6,9 @@ sftp-connector 10.0.1-SNAPSHOT iar + + 10.0.16 + com.jcraft @@ -30,7 +33,7 @@ com.axonivy.ivy.ci project-build-plugin - 10.0.6 + ${project.build.plugin.version} true