Add test TFM for netstandard2.1
TFM
#125
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: 'Treasure.Utils-PR' | |
on: pull_request | |
env: | |
# Stop wasting time caching packages | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
jobs: | |
build: | |
name: 'Build Treasure.Utils' | |
strategy: | |
max-parallel: 3 | |
fail-fast: false | |
matrix: | |
platform: [ windows, ubuntu, macos ] | |
runs-on: ${{ matrix.platform }}-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
6.x | |
7.x | |
- run: dotnet workload install macos | |
if: matrix.platform == 'macos' | |
- name: Patch global.json if necessary | |
shell: pwsh | |
run: ./scripts/PatchGlobalJson.ps1 | |
- name: Install dependencies | |
run: dotnet restore | |
- name: DotNet Format | |
run: dotnet format --no-restore --verify-no-changes | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Test | |
run: dotnet test --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
name: codecov-${{ matrix.platform }} | |
directory: __test-results | |
fail_ci_if_error: true | |
verbose: true | |
- name: Upload output artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: __output_${{ matrix.platform }} | |
path: __output | |
- name: Upload packages artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: __packages_${{ matrix.platform }} | |
path: __packages |