Skip to content

Commit

Permalink
fix unity yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
nirinchev committed May 23, 2024
1 parent 360706d commit a41b931
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
9 changes: 6 additions & 3 deletions .github/pkl-workflows/helpers/Test.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,9 @@ function unity(config: UnityTestConfig): Mapping<String, gha.Job> = new Mapping<
"unity"
config.os
}
needs {
Common.job_Packages
}
`timeout-minutes` = 30
`if` = Common.ifNotCanceledCondition
steps {
Expand Down Expand Up @@ -434,10 +437,10 @@ function unity(config: UnityTestConfig): Mapping<String, gha.Job> = new Mapping<
when (config.os == "windows") {
new gha.Step {
name = "Run Tests"
run = """
Start-Process ${{ github.workspace }}\\TestRunner\\PlayerWithTests.exe -Wait -ArgumentList "-logFile","${{ github.workspace }}\\test.log","--result=${{ github.workspace }}\\\(outputFile)"
run = #"""
Start-Process ${{ github.workspace }}\TestRunner\PlayerWithTests.exe -Wait -ArgumentList "-logFile","${{ github.workspace }}\test.log","--result=${{ github.workspace }}\\#(outputFile)"
cat ${{ github.workspace }}\test.log
"""
"""#
shell = "pwsh"
}
}
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ jobs:
if-no-files-found: error
build-unity-tests-linux:
name: Build Unity linux
needs:
- build-packages
if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
timeout-minutes: 30
runs-on:
Expand Down Expand Up @@ -385,6 +387,8 @@ jobs:
fail-on-error: true
build-unity-tests-windows:
name: Build Unity windows
needs:
- build-packages
if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
timeout-minutes: 30
runs-on:
Expand Down Expand Up @@ -444,7 +448,9 @@ jobs:
name: UnityTestsRunner.windows
path: TestRunner
- name: Run Tests
run: "Start-Process ${{ github.workspace }}\TestRunner\PlayerWithTests.exe -Wait -ArgumentList \"-logFile\",\"${{ github.workspace }}\test.log\",\"--result=${{ github.workspace }}\TestResults.xml\"\ncat ${{ github.workspace }}\test.log"
run: |-
Start-Process ${{ github.workspace }}\TestRunner\PlayerWithTests.exe -Wait -ArgumentList "-logFile","${{ github.workspace }}\test.log","--result=${{ github.workspace }}\TestResults.xml"
cat ${{ github.workspace }}\test.log
shell: pwsh
- name: Publish Unit Test Results
if: always()
Expand Down

0 comments on commit a41b931

Please sign in to comment.