Update packages #233
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: dotnet build and tests | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: src | |
strategy: | |
matrix: | |
configuration: [Release, Debug] | |
dotnet-version: [ '8.0.x' ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }} | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: ${{ matrix.dotnet-version }} | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build Utils/Dybal.Utils.TypedValues.SourceGenerators/Dybal.Utils.TypedValues.SourceGenerators.csproj --configuration ${{ matrix.configuration }} --no-restore | |
- name: Build | |
run: dotnet build Analyzers/Dybal.Utils.Guards.Analyzers/Dybal.Utils.Guards.Analyzers.csproj --configuration ${{ matrix.configuration }} --no-restore | |
- name: Build | |
run: dotnet build --configuration ${{ matrix.configuration }} --no-restore | |
- name: Test | |
run: dotnet test --no-restore --verbosity normal --logger trx --results-directory "TestResults/${{ matrix.dotnet-version }}/${{ matrix.configuration }}" | |
- name: Upload dotnet test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dotnet-results-${{ matrix.dotnet-version }}-${{ matrix.configuration }} | |
path: src/TestResults/${{ matrix.dotnet-version }}/${{ matrix.configuration }} | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} | |
- name: Test Reporter | |
uses: dorny/[email protected] | |
continue-on-error: true | |
if: ${{ always() }} | |
with: | |
name: tests ${{ matrix.dotnet-version }} ${{ matrix.configuration }} | |
path: src/TestResults/${{ matrix.dotnet-version }}/${{ matrix.configuration }}/*.trx | |
reporter: dotnet-trx |