chore: update readme Adapter pattern #12
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: Build and Test .NET | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: 8.0.x | |
- name: Install dependencies | |
run: dotnet restore src | |
- name: Build | |
run: dotnet build src --no-restore | |
- name: Test with coverage | |
run: | | |
dotnet tool install --global coverlet.console | |
dotnet test src --no-restore --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=./coverage/ | |
- name: Report coverage | |
uses: actions/upload-artifact@v2 | |
with: | |
name: coverage-report | |
path: src/**/coverage.cobertura.xml | |
- name: Publish Test Results | |
uses: actions/upload-artifact@v2 | |
with: | |
name: test-results | |
path: src/**/TestResults/*.trx | |