Skip to content

Commit

Permalink
remove nunit to junit conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
KurtGokhan committed Dec 5, 2022
1 parent 2f5962c commit 3d050bf
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,34 +184,11 @@ jobs:
- name: Set artifacts folder ownership to current user
run: sudo chown -R $(id -u):$(id -g) "${{ github.workspace }}/${{ steps.testRunner.outputs.artifactsPath }}"

# Workaround for NUnit XML (see https://github.com/dorny/test-reporter/issues/98#issuecomment-867106931)
- name: Install NUnit
run: |
nuget install NUnit.Console -Version 3.12.0
- name: Fetch transform code
working-directory: "${{ github.workspace }}/${{ steps.testRunner.outputs.artifactsPath }}"
run: |
wget https://raw.githubusercontent.com/nunit/nunit-transforms/master/nunit3-junit/nunit3-junit.xslt
shell: bash

- name: Transform NUnit3 to JUnit
working-directory: "${{ github.workspace }}/${{ steps.testRunner.outputs.artifactsPath }}"
run: |
Get-ChildItem . -Filter *.xml | Foreach-Object {
$xml = Resolve-Path $_.FullName
$output = Join-Path ($pwd) ($_.BaseName + '_junit.xml')
$xslt = New-Object System.Xml.Xsl.XslCompiledTransform;
$xslt.Load("nunit3-junit.xslt");
$xslt.Transform($xml, $output);
}
shell: pwsh

- uses: EnricoMi/publish-unit-test-result-action@v2
id: test-results
with:
check_name: "${{ matrix.suite.name }} ${{ matrix.unity.version }}"
files: "${{ github.workspace }}/${{ steps.testRunner.outputs.artifactsPath }}/*_junit.xml"
nunit_files: "${{ github.workspace }}/${{ steps.testRunner.outputs.artifactsPath }}/*.xml"

- name: Set badge color
shell: bash
Expand Down

0 comments on commit 3d050bf

Please sign in to comment.