From 75abe8f27bc06741dc3aee70c45f545aabfdea5b Mon Sep 17 00:00:00 2001 From: Stephane Bouchet Date: Fri, 3 Feb 2023 15:48:50 +0100 Subject: [PATCH 01/13] JBIDE-28870: update GH action workflow Signed-off-by: Stephane Bouchet --- .github/workflows/build_test.yml | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index d33c4767c..8a83b22bb 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -10,39 +10,30 @@ jobs: strategy: matrix: - os: [ubuntu-latest] - java: ["17"] + os: [ ubuntu-latest, macos-latest, windows-latest ] + java: ["17, 18, 19"] fail-fast: false steps: - name: Checkout PR branch - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} # Checkout global JBT settings.xml - name: Checkout JBoss Tools Build CI - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: jbosstools/jbosstools-build-ci path: build-ci - # Java JDK 11 used for maven build + # Java JDK used for maven build - name: Setup Java ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: java-version: ${{ matrix.java }} - java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk - architecture: x64 - - # Try to find and apply jbosstools cache - - name: Cache local Maven repository for JBoss Tools components - uses: actions/cache@v2 - with: - path: ~/.m2/repository - key: jbosstools-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - jbosstools-${{ runner.os }}-maven- + distribution: 'temurin' + cache: 'maven' # Build and compile using Maven - name: Build/Compile and run unit tests From 965c1f12a2004692c1da6f06c9e16694bb059239 Mon Sep 17 00:00:00 2001 From: Stephane Bouchet Date: Fri, 3 Feb 2023 15:52:04 +0100 Subject: [PATCH 02/13] JBIDE-28870: update GH action workflow Signed-off-by: Stephane Bouchet --- .github/workflows/build_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 8a83b22bb..0db17fceb 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: os: [ ubuntu-latest, macos-latest, windows-latest ] - java: ["17, 18, 19"] + java: [17, 18, 19] fail-fast: false steps: From 05b33684c519eeca904ef81c5229b5c7d2ed12ff Mon Sep 17 00:00:00 2001 From: Stephane Bouchet Date: Fri, 3 Feb 2023 16:21:28 +0100 Subject: [PATCH 03/13] JBIDE-28870: update GH action workflow Java19 not supported by tycho 2.7 Signed-off-by: Stephane Bouchet --- .github/workflows/build_test.yml | 12 +++++++----- .github/workflows/publish_reports.yml | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 0db17fceb..1ce407013 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -36,14 +36,16 @@ jobs: cache: 'maven' # Build and compile using Maven - - name: Build/Compile and run unit tests - uses: GabrielBB/xvfb-action@v1 - with: - run: mvn clean verify -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp + - name: Run tests (Linux) + run: xvfb-run -a mvn clean verify -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp + if: ${{ matrix.os == 'ubuntu-latest' }} + - name: Run tests (Windows/Mac) + run: mvn clean verify -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp + if: ${{ matrix.os != 'ubuntu-latest' }} # Archive artifacts to be applied in Publish Reports workflow - name: Archiving test artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ${{ matrix.os }}-${{ matrix.java }}-test-reports path: | diff --git a/.github/workflows/publish_reports.yml b/.github/workflows/publish_reports.yml index 2a062f805..af63c25ca 100644 --- a/.github/workflows/publish_reports.yml +++ b/.github/workflows/publish_reports.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download artifacts - uses: actions/github-script@v3.1.0 + uses: actions/github-script@v6 with: script: | var artifacts = await github.actions.listWorkflowRunArtifacts({ From 556a20f0fc053a5ff0781343902998449d17aa00 Mon Sep 17 00:00:00 2001 From: Stephane Bouchet Date: Fri, 3 Feb 2023 16:24:27 +0100 Subject: [PATCH 04/13] JBIDE-28870: update GH action workflow Java19 not supported by tycho 2.7 Signed-off-by: Stephane Bouchet --- .github/workflows/build_test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 1ce407013..f618cc0b1 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: os: [ ubuntu-latest, macos-latest, windows-latest ] - java: [17, 18, 19] + java: [17, 18] fail-fast: false steps: @@ -36,10 +36,10 @@ jobs: cache: 'maven' # Build and compile using Maven - - name: Run tests (Linux) + - name: Build/Compile and run unit tests (Linux) run: xvfb-run -a mvn clean verify -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp if: ${{ matrix.os == 'ubuntu-latest' }} - - name: Run tests (Windows/Mac) + - name: Build/Compile and run unit tests (Windows/Mac) run: mvn clean verify -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp if: ${{ matrix.os != 'ubuntu-latest' }} From 88e33efaa2bf344c695d5a2ae1b9b3dfd22c5ca8 Mon Sep 17 00:00:00 2001 From: Stephane Bouchet Date: Fri, 3 Feb 2023 16:46:26 +0100 Subject: [PATCH 05/13] JBIDE-28870: update GH action workflow Signed-off-by: Stephane Bouchet --- .github/workflows/build_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index f618cc0b1..02d048f31 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: os: [ ubuntu-latest, macos-latest, windows-latest ] - java: [17, 18] + java: [ 17, 18 ] fail-fast: false steps: @@ -40,7 +40,7 @@ jobs: run: xvfb-run -a mvn clean verify -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp if: ${{ matrix.os == 'ubuntu-latest' }} - name: Build/Compile and run unit tests (Windows/Mac) - run: mvn clean verify -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp + run: mvn -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp clean verify if: ${{ matrix.os != 'ubuntu-latest' }} # Archive artifacts to be applied in Publish Reports workflow From ae5b8e6f05fddadc45ab5f533dada49a0a99ea51 Mon Sep 17 00:00:00 2001 From: Stephane Bouchet Date: Fri, 3 Feb 2023 17:01:27 +0100 Subject: [PATCH 06/13] JBIDE-28870: update GH action workflow Signed-off-by: Stephane Bouchet --- .github/workflows/build_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 02d048f31..63eefaf84 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -40,7 +40,7 @@ jobs: run: xvfb-run -a mvn clean verify -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp if: ${{ matrix.os == 'ubuntu-latest' }} - name: Build/Compile and run unit tests (Windows/Mac) - run: mvn -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp clean verify + run: 'mvn -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp clean verify'' if: ${{ matrix.os != 'ubuntu-latest' }} # Archive artifacts to be applied in Publish Reports workflow From 44ddf9d11d717bf3f73186f5e5dc8f446b2e7394 Mon Sep 17 00:00:00 2001 From: Stephane Bouchet Date: Fri, 3 Feb 2023 17:02:54 +0100 Subject: [PATCH 07/13] JBIDE-28870: update GH action workflow Signed-off-by: Stephane Bouchet --- .github/workflows/build_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 63eefaf84..38dd19727 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -40,7 +40,7 @@ jobs: run: xvfb-run -a mvn clean verify -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp if: ${{ matrix.os == 'ubuntu-latest' }} - name: Build/Compile and run unit tests (Windows/Mac) - run: 'mvn -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp clean verify'' + run: 'mvn -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp clean verify' if: ${{ matrix.os != 'ubuntu-latest' }} # Archive artifacts to be applied in Publish Reports workflow From d7d1b9834c07cfff2807594c817d48e4a606fc3e Mon Sep 17 00:00:00 2001 From: Stephane Bouchet Date: Mon, 6 Feb 2023 10:53:48 +0100 Subject: [PATCH 08/13] JBIDE-28870: update GH action workflow Signed-off-by: Stephane Bouchet --- .github/workflows/build_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 38dd19727..b4afab9e5 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -40,7 +40,7 @@ jobs: run: xvfb-run -a mvn clean verify -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp if: ${{ matrix.os == 'ubuntu-latest' }} - name: Build/Compile and run unit tests (Windows/Mac) - run: 'mvn -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp clean verify' + run: "mvn -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp clean verify" if: ${{ matrix.os != 'ubuntu-latest' }} # Archive artifacts to be applied in Publish Reports workflow From 97ef3b51a65db4ff08efbf29ca8742a7bebb50b0 Mon Sep 17 00:00:00 2001 From: Stephane Bouchet Date: Mon, 6 Feb 2023 11:50:16 +0100 Subject: [PATCH 09/13] Signed-off-by: Stephane Bouchet --- .github/workflows/build_test.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index b4afab9e5..f2fe17ecc 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -39,9 +39,12 @@ jobs: - name: Build/Compile and run unit tests (Linux) run: xvfb-run -a mvn clean verify -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp if: ${{ matrix.os == 'ubuntu-latest' }} - - name: Build/Compile and run unit tests (Windows/Mac) - run: "mvn -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp clean verify" - if: ${{ matrix.os != 'ubuntu-latest' }} + - name: Build/Compile and run unit tests (Mac) + run: mvn clean verify -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp + if: ${{ matrix.os == 'macos-latest' }} + - name: Build/Compile and run unit tests (Windows) + run: mvn clean verify --% -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp + if: ${{ matrix.os == 'windows-latest' }} # Archive artifacts to be applied in Publish Reports workflow - name: Archiving test artifacts From 3d7340c7daed334420505b7644b1b1d9e4eee405 Mon Sep 17 00:00:00 2001 From: Stephane Bouchet Date: Mon, 6 Feb 2023 14:24:56 +0100 Subject: [PATCH 10/13] Disable upload artifacts for windows Signed-off-by: Stephane Bouchet --- .github/workflows/build_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index f2fe17ecc..8a3cfe1d3 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -49,6 +49,7 @@ jobs: # Archive artifacts to be applied in Publish Reports workflow - name: Archiving test artifacts uses: actions/upload-artifact@v3 + if: ${{ matrix.os != 'windows-latest'}} # currently disabled because of https://github.com/actions/upload-artifact/issues/240 with: name: ${{ matrix.os }}-${{ matrix.java }}-test-reports path: | From 97a2b23f5792fddae4da36f24a2a7186503ae741 Mon Sep 17 00:00:00 2001 From: Stephane Bouchet Date: Tue, 7 Feb 2023 15:00:29 +0100 Subject: [PATCH 11/13] JBIDE-28870: update GH action workflow Signed-off-by: Stephane Bouchet --- .github/workflows/build_test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 8a3cfe1d3..15e18e5f6 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -42,8 +42,9 @@ jobs: - name: Build/Compile and run unit tests (Mac) run: mvn clean verify -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp if: ${{ matrix.os == 'macos-latest' }} + # as below, do fail builds on errors - name: Build/Compile and run unit tests (Windows) - run: mvn clean verify --% -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp + run: mvn clean verify --% -U -fae -B --settings build-ci/maven-settings.xml -fae -DskipITests=true -ntp if: ${{ matrix.os == 'windows-latest' }} # Archive artifacts to be applied in Publish Reports workflow From 6f23b2459173e0fcf78d889f9e94033a1071e8c8 Mon Sep 17 00:00:00 2001 From: Stephane Bouchet Date: Fri, 17 Feb 2023 12:37:11 +0100 Subject: [PATCH 12/13] JBIDE-28870: fix test for win32 Signed-off-by: Stephane Bouchet --- .../test/common/ui/utils/OdoDownloadHelperTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/org.jboss.tools.openshift.test/src/org/jboss/tools/openshift/test/common/ui/utils/OdoDownloadHelperTest.java b/tests/org.jboss.tools.openshift.test/src/org/jboss/tools/openshift/test/common/ui/utils/OdoDownloadHelperTest.java index 8b79e73fd..60d20290e 100644 --- a/tests/org.jboss.tools.openshift.test/src/org/jboss/tools/openshift/test/common/ui/utils/OdoDownloadHelperTest.java +++ b/tests/org.jboss.tools.openshift.test/src/org/jboss/tools/openshift/test/common/ui/utils/OdoDownloadHelperTest.java @@ -15,11 +15,14 @@ import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.spy; +import static org.eclipse.core.runtime.Platform.OS_WIN32; + import java.io.File; import java.io.IOException; import java.net.URL; import org.apache.commons.io.FileUtils; +import org.eclipse.core.runtime.Platform; import org.jboss.tools.common.util.DownloadHelper; import org.jboss.tools.openshift.internal.test.OpenShiftTestActivator; import org.junit.AfterClass; @@ -49,7 +52,8 @@ public void testThatODOisDownloaded() throws IOException { assertNotNull(url); String cmd = helper.downloadIfRequired("odo", url); assertNotNull(cmd); + String fullProgramExe = OS_WIN32.equals(Platform.getOS())? "odo.exe":"odo"; assertEquals(ODO_CACHE_DIR + File.separatorChar + "cache" + File.separatorChar + "1.0.2" + File.separatorChar - + "odo", cmd); + + fullProgramExe, cmd); } } From bc314f8801beaa64742372534fc5b0f81cd48969 Mon Sep 17 00:00:00 2001 From: Stephane Bouchet Date: Tue, 10 Oct 2023 14:43:04 +0200 Subject: [PATCH 13/13] Update build_test.yml --- .github/workflows/build_test.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 15e18e5f6..7be385dd3 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: os: [ ubuntu-latest, macos-latest, windows-latest ] - java: [ 17, 18 ] + java: [ 17, 18, 19, 20, 21 ] fail-fast: false steps: @@ -34,6 +34,12 @@ jobs: java-version: ${{ matrix.java }} distribution: 'temurin' cache: 'maven' + + # Install Maven 3.9 + - name: Set up Maven + uses: stCarolas/setup-maven@07fbbe97d97ef44336b7382563d66743297e442f #v4.5 + with: + maven-version: 3.9.4 # Build and compile using Maven - name: Build/Compile and run unit tests (Linux)