Skip to content

Commit

Permalink
Copy core and mockserver to temp folder
Browse files Browse the repository at this point in the history
  • Loading branch information
theotherp committed Nov 20, 2023
1 parent 269a2e5 commit e5e123e
Showing 1 changed file with 14 additions and 23 deletions.
37 changes: 14 additions & 23 deletions .github/workflows/system-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,22 +180,28 @@ 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"
continue-on-error: true
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'}}
Expand All @@ -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'
Expand All @@ -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

Expand Down

0 comments on commit e5e123e

Please sign in to comment.