Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run tests as part of CI #67

Merged
merged 15 commits into from
Apr 11, 2022
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,28 @@ jobs:
if: ${{github.ref == 'refs/heads/main'}}
run: dotnet nuget push "**/*.nupkg" --api-key dummy --source LabsFeed --skip-duplicate


# Run tests
- name: Setup VSTest Path
uses: darenm/Setup-VSTest@v1
michael-hawker marked this conversation as resolved.
Show resolved Hide resolved

- name: Run SourceGenerators tests
run: vstest.console.exe ./Common/CommunityToolkit.Labs.Core.SourceGenerators.Tests/CommunityToolkit.Labs.Core.SourceGenerators.Tests/bin/Release/net6.0/CommunityToolkit.Labs.Core.SourceGenerators.Tests.dll /logger:"trx;LogFileName=SourceGenerators.trx"

- name: Run experiment tests against UWP
run: vstest.console.exe ./Tests/**/CommunityToolkit.Labs.UnitTests.UWP.build.appxrecipe /Framework:FrameworkUap10 /logger:"trx;LogFileName=UWP.trx"

- name: Run experiment tests against WinAppSDK
run: vstest.console.exe ./Tests/**/CommunityToolkit.Labs.UnitTests.WinAppSdk.build.appxrecipe /Framework:FrameworkUap10 /logger:"trx;LogFileName=WinAppSdk.trx"

- name: Create test reports
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
with:
name: Test results
path: './TestResults/*.trx'
reporter: dotnet-trx

# Test/temp job to build a single experiment to ensure our changes work for both our main types of solutions at the moment
experiment:
runs-on: windows-latest
Expand Down