build(deps): bump MSTest.TestAdapter from 3.5.2 to 3.6.0 #173
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
create: | |
branches: | |
- release/** | |
push: | |
branches: | |
- master | |
- dev/** | |
paths: | |
- MemoryModule/** | |
- MemoryModule.Compact.Windows/** | |
- MemoryModule.Tests/** | |
- MemoryModule.Compact.Windows.Tests/** | |
- .github/workflows/ci.yml | |
- "*.yml" | |
- "*.md" | |
pull_request: | |
branches: | |
- master | |
paths: | |
- MemoryModule/** | |
- MemoryModule.Compact.Windows/** | |
- MemoryModule.Tests/** | |
- MemoryModule.Compact.Windows.Tests/** | |
- .github/workflows/ci.yml | |
- "*.yml" | |
- "*.md" | |
jobs: | |
build: | |
env: | |
BUILD_CONFIG: 'Release' | |
SOLUTION: 'MemoryModule.Windows.sln' | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/setup@v0.10.2 | |
with: | |
versionSpec: '5.x' | |
- name: Determine Version | |
id: gitversion | |
uses: gittools/actions/gitversion/execute@v0.10.2 | |
- name: Setup NuGet | |
uses: NuGet/setup-nuget@v1.2.0 | |
- name: Restore dependencies | |
run: nuget restore $env:SOLUTION | |
- name: Setup .NET | |
run: | | |
Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -OutFile 'dotnet-install.ps1' | |
./dotnet-install.ps1 -Channel Current | |
shell: pwsh | |
- name: Setup MSBuild | |
uses: microsoft/setup-msbuild@v1.1.3 | |
- name: Build | |
run: msbuild $env:SOLUTION /p:Configuration=$env:BUILD_CONFIG /p:Platform="Any CPU" -p:Version=${{ steps.gitversion.outputs.assemblySemVer }} | |
- name: Run tests | |
run: dotnet test $env:SOLUTION /p:Configuration=$env:BUILD_CONFIG /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --no-restore --no-build -l "console;verbosity=detailed" | |
- name: Build nuget packages | |
run: msbuild -t:pack $env:SOLUTION -p:Configuration=$env:BUILD_CONFIG -p:PackageVersion=${{ steps.gitversion.outputs.semVer }} | |
- name: Move nuget packages | |
run: mkdir .nupkgs; get-childitem *.*nupkg -recurse | foreach-object {move-item $_ -destination .nupkgs} | |
shell: pwsh | |
- name: Publish nuget artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: packages.${{ steps.gitversion.outputs.semVer }} | |
path: .nupkgs/** | |
- name: Publish dev | |
if: github.ref == 'refs/heads/master' | |
run: nuget push .nupkgs\** -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}} | |
- name: Publish | |
if: startsWith(github.ref, 'refs/heads/release') | |
run: nuget push .nupkgs\** -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}} |