Skip to content

Commit

Permalink
Merge pull request #125 from microsoft/gh-issue-120
Browse files Browse the repository at this point in the history
Adding tests to GitHub Action
  • Loading branch information
brianlagunas authored Apr 11, 2023
2 parents 1cc0e7d + 771851d commit f219798
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
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

0 comments on commit f219798

Please sign in to comment.