SIANXSVC-1106: Create a .NET library for E5E #52
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: "Run tests" | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
name: Run tests (${{ matrix.dotnet-version }}) | |
env: | |
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages | |
strategy: | |
matrix: | |
dotnet-version: ["6.0.x", "8.0.x"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: "${{ matrix.dotnet-version }}" | |
cache: true | |
cache-dependency-path: src/**/packages.lock.json | |
- run: dotnet restore --locked-mode | |
- name: Run tests with coverage | |
run: dotnet test --no-restore --collect:"XPlat Code Coverage /p:CoverletOutputFormat=opencover --logger trx --results-directory "test-results" | |
- name: Publish test results (${{ matrix.dotnet-version }}) | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
if: always() | |
with: | |
comment_mode: off | |
files: | | |
test-results/**/*.xml | |
test-results/**/*.trx | |
test-results/**/*.json | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 |