MegaBites-AI/Windows-powershell
0372
1name: xUnit Tests (Reusable)2 3on:4 workflow_call:5 inputs:6 runner_os:7 description: 'Runner OS for xUnit tests'8 type: string9 required: false10 default: ubuntu-latest11 test_results_artifact_name:12 description: 'Artifact name for xUnit test results directory'13 type: string14 required: false15 default: testResults-xunit16 17permissions:18 contents: read19 20jobs:21 xunit:22 name: Run xUnit Tests23 runs-on: ${{ inputs.runner_os }}24 steps:25 - name: Checkout26 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.227 with:28 fetch-depth: 100029 30 - name: Setup .NET31 uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.032 with:33 global-json-file: ./global.json34 35 - name: Bootstrap36 shell: pwsh37 run: |38 Import-Module ./tools/ci.psm139 Invoke-CIInstall -SkipUser40 Sync-PSTags -AddRemoteIfMissing41 42 - name: Build PowerShell and run xUnit tests43 shell: pwsh44 run: |45 Import-Module ./tools/ci.psm146 Start-PSBuild47 Write-Host "Running full xUnit test suite (no skipping)..."48 Invoke-CIxUnit49 Write-Host "Completed xUnit test run."50 51 - name: Upload xUnit results52 uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.053 if: always()54 with:55 name: ${{ inputs.test_results_artifact_name }}56 path: ${{ github.workspace }}/xUnitTestResults.xml57 