Skip to content

Commit 470011b

Browse files
Add test-tooling source generator job to build.yml
1 parent 338fa9a commit 470011b

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,48 @@ jobs:
4545
- name: Check XAML Styling
4646
run: powershell -version 5.1 -command "./ApplyXamlStyling.ps1 -Passive" -ErrorAction Stop
4747

48+
test-tooling:
49+
runs-on: ubuntu-latest
50+
51+
steps:
52+
- name: Install .NET SDK v${{ env.DOTNET_VERSION }}
53+
uses: actions/setup-dotnet@v3
54+
with:
55+
dotnet-version: ${{ env.DOTNET_VERSION }}
56+
57+
- name: .NET Info (if diagnostics)
58+
if: ${{ env.ENABLE_DIAGNOSTICS == 'true' }}
59+
run: dotnet --info
60+
61+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
62+
- name: Checkout Repository
63+
uses: actions/checkout@v3
64+
65+
- name: dotnet build
66+
working-directory: ./
67+
run: dotnet build /bl CommunityToolkit.Tooling.sln
68+
69+
# Run tests
70+
- name: Install Testspace Module
71+
uses: testspace-com/setup-testspace@v1
72+
with:
73+
domain: ${{ github.repository_owner }}
74+
75+
- name: Run tests against Source Generators
76+
run: dotnet test --logger "trx;LogFileName=sourceGeneratorTestResults.trx"
77+
78+
- name: Create test reports
79+
run: |
80+
testspace '[Source Generators]./**/TestResults/*.trx'
81+
if: ${{ always() }}
82+
83+
- name: Artifact - Diagnostic Logs
84+
uses: actions/upload-artifact@v3
85+
if: ${{ (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && always() }}
86+
with:
87+
name: test-tooling-logs
88+
path: ./**/*.*log
89+
4890
# Test job to build the project template
4991
project-template:
5092
runs-on: windows-latest

0 commit comments

Comments
 (0)