Add unit tests for new polyfill types #325
Workflow file for this run
This file contains 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: .NET | |
on: [push, pull_request] | |
env: | |
EXCLUDE_RUN_ID_FROM_PACKAGE: false | |
EXCLUDE_SUFFIX_FROM_VERSION: false | |
jobs: | |
# Build the whole PolySharp solution | |
build-solution: | |
strategy: | |
matrix: | |
configuration: [Debug, Release] | |
runs-on: windows-2022 | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
- name: Build | |
run: dotnet build -c ${{matrix.configuration}} /bl | |
- name: Upload MSBuild binary log | |
uses: actions/upload-artifact@v3 | |
with: | |
name: msbuild_log_${{matrix.configuration}} | |
path: msbuild.binlog | |
if-no-files-found: error | |
# Run unit tests | |
run-tests: | |
if: success() | |
needs: [build-solution] | |
runs-on: windows-2022 | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
- name: Run unit tests | |
run: dotnet test -c Release | |
# Build the .msbuildproj projects to generate all the NuGet packages | |
build-packages: | |
runs-on: windows-2022 | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
- name: Build PolySharp package | |
run: dotnet build src\PolySharp.Package\PolySharp.Package.msbuildproj -c Release | |
- name: Upload package artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: nuget_packages | |
path: artifacts\*.nupkg | |
if-no-files-found: error | |
# Download the NuGet packages generated in the previous job and use them | |
# to build and run the sample project referencing them. This is used as | |
# a test to ensure the NuGet packages work in a consuming project. | |
verify-packages: | |
if: success() | |
needs: [build-packages] | |
runs-on: windows-2022 | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
- name: Create local NuGet feed | |
run: mkdir artifacts | |
- name: Download package artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: nuget_packages | |
path: artifacts | |
- name: Build PolySharp.NuGet | |
run: dotnet build tests\PolySharp.NuGet\PolySharp.NuGet.csproj -c Release |