Skip to content

Commit

Permalink
Update action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Nullpointer authored Apr 28, 2024
1 parent 6c134a1 commit bb49a4e
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ runs:
echo -e "\e[94mStart of the recovery of the project cache ...\e[0m"
$GODOT_BIN --path ./ -e --headless --quit-after 2000
echo -e "\e[94mProject cache successfully restored.\e[0m"
# set default reporter
## GDScript test run
- name: 'Run GDScript Tests'
if: ${{ !cancelled() && inputs.godot-net == 'false' }}
env:
Expand All @@ -181,6 +181,15 @@ runs:
};
await runTests(args, core);
- name: 'Publish GDScript Unit Test Reports'
if: ${{ !cancelled() && inputs.publish-report == 'true' && inputs.godot-net == 'false'}}
uses: ./.gdunit4_action/publish-test-report
with:
project_dir: ${{ inputs.project_dir }}
report-name: ${{ inputs.report-name }}
reporter: java-junit

## .Net test run
- name: 'Run C# Tests'
if: ${{ !cancelled() && inputs.godot-net == 'true' }}
env:
Expand All @@ -197,23 +206,15 @@ runs:
fi
xvfb-run --auto-servernum dotnet test --no-build --settings .runsettings --results-directory ./reports --logger "trx;LogFileName=results.xml" -- GdUnit4.Parameters="--audio-driver Dummy --display-driver x11 --rendering-driver opengl3 --screen 0"
- name: 'Set Test Reporter'
shell: bash
run: |
if [[ ${{ inputs.godot-net == 'true' }} ]]; then
echo "ReportType=dotnet-trx" >> "$GITHUB_ENV"
else
echo "ReportType=java-junit" >> "$GITHUB_ENV"
fi
- name: 'Publish Unit Test Reports'
if: ${{ !cancelled() && inputs.publish-report == 'true' }}
- name: 'Publish .Net Unit Test Reports'
if: ${{ !cancelled() && inputs.publish-report == 'true' && inputs.godot-net == 'true'}}
uses: ./.gdunit4_action/publish-test-report
with:
project_dir: ${{ inputs.project_dir }}
report-name: ${{ inputs.report-name }}
reporter: ${{ env.ReportType }}
reporter: dotnet-trx

## Finally upload the test result artifacts
- name: 'Upload Unit Test Reports'
if: ${{ !cancelled() && inputs.upload-report == 'true' }}
uses: ./.gdunit4_action/upload-test-report
Expand Down

0 comments on commit bb49a4e

Please sign in to comment.