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

Adding tests to GitHub Action #125

Merged
merged 2 commits into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,32 @@ jobs:
managed-build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.

- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- uses: nuget/setup-nuget@v1.0.5

- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.0.2

- name: Restore
run: nuget restore src/BehaviorsSdk.sln
- uses: microsoft/setup-msbuild@v1.0.2

- name: Build
run: msbuild src/BehaviorsSdk.sln /p:Configuration=Release

- name: Run Tests
run: dotnet test src/BehaviorsSdk.sln --no-restore --verbosity minimal

- name: Pack Behaviors
if: success()
run: msbuild src/Microsoft.Xaml.Behaviors/Microsoft.Xaml.Behaviors.csproj /p:Configuration=Release -t:pack

- name: Upload NuGet Artifacts
if: success()
uses: actions/upload-artifact@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-63127-02" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="0.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down