From e5e123ed620d4a05da8bfdf05f7ffd8ef8c17105 Mon Sep 17 00:00:00 2001 From: TheOtherP Date: Mon, 20 Nov 2023 12:32:04 +0100 Subject: [PATCH] Copy core and mockserver to temp folder --- .github/workflows/system-test.yml | 37 ++++++++++++------------------- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/.github/workflows/system-test.yml b/.github/workflows/system-test.yml index 8a1ee416e..bd74f509c 100644 --- a/.github/workflows/system-test.yml +++ b/.github/workflows/system-test.yml @@ -180,8 +180,14 @@ jobs: NZBHYDRANAME: windows nzbhydra.name: windows steps: - - uses: actions/checkout@v3 - name: "Check out source" + - name: "Check out source" + uses: actions/checkout@v3 + + - name: "Prepare folders" + run: | + mkdir ${{ runner.temp }}/core + mkdir ${{ runner.temp }}/mockserver + copy other/mockserver/target/*-exec.jar ${{ runner.temp }}/mockserver/exec.jar - name: "Download windows artifact from current workflow" id: "downloadArtifactThisBuild" @@ -189,13 +195,13 @@ jobs: uses: actions/download-artifact@master with: name: coreWindows - path: core.exe + path: ${{ runner.temp }}/core/core.exe - - name: Check if core.exe was downloaded + - name: "Check if core.exe was downloaded" id: checkCoreExe uses: andstor/file-existence-action@v1 with: - files: "core.exe" + files: ${{ runner.temp }}/core/core.exe - name: "Download windows artifact from previous workflow if no native build was executed" if: ${{steps.checkCoreExe.outputs.files_exists == 'false'}} @@ -205,15 +211,9 @@ jobs: #Search for matching artifact in any of the last completed workflows search_artifacts: true workflow_conclusion: 'completed' + path: ${{ runner.temp }}/core/ - # - name: "Start NZBHydra" - # # Produces "The specified executable is not a valid application for this OS platform." on GH runner. - # # Start-Process .\NZBHydra2.exe - # run: | - # $Env:SPRING_PROFILES_ACTIVE= "build,systemtest,core" - # Start-Process .\core.exe directstart - - - name: Set up JDK 17 + - name: "Set up JDK 17" uses: actions/setup-java@v3 with: java-version: '17' @@ -223,19 +223,10 @@ jobs: - name: "Install maven" run: mvn --batch-mode clean install -DskipTests -pl org.nzbhydra:nzbhydra2,org.nzbhydra:shared,org.nzbhydra:mapping,org.nzbhydra:assertions,org.nzbhydra:mockserver - # - name: "Start Mockserver" - # run: | - # $Env:SPRING_PROFILES_ACTIVE= "build,systemtest" - # copy other/mockserver/target/*-exec.jar other/mockserver/target/exec.jar - # Start-Process java -ArgumentList "-jar other/mockserver/target/exec.jar" - - # - name: "Run tests" - # run: mvn --batch-mode test -pl org.nzbhydra.tests:system -DtrimStackTrace=false - - name: "Start mock server and hydra, run tests" uses: BerniWittmann/background-server-action@v1 with: - start: core.exe directstart, java -jar other/mockserver/target/exec.jar + start: ${{ runner.temp }}/core/core.exe directstart, java -jar ${{ runner.temp }}/mockserver/exec.jar wait-on: 'http://localhost:5076, http://localhost:5080' command: mvn --batch-mode test -pl org.nzbhydra.tests:system -DtrimStackTrace=false