name: .NET Test on: push: branches: [ main ] tags-ignore: - '**' paths-ignore: - 'README.md' - 'LICENSE' - '.vscode/**' - '.gitea/workflows/publish-*.yaml' pull_request: branches: [ main ] jobs: test: runs-on: ubuntu-latest name: .NET tests permissions: contents: read actions: write env: DOTNET_CLI_TELEMETRY_OPTOUT: 'true' steps: - uses: actions/checkout@v5 with: persist-credentials: false - name: Setup .NET uses: actions/setup-dotnet@v4 with: global-json-file: global.json cache: true cache-dependency-path: '**/packages.lock.json' - name: Restore dependencies run: dotnet restore --locked-mode --disable-parallel - name: Build run: dotnet build --configuration Release --no-restore - name: Test run: >- dotnet test --configuration Release --no-build --verbosity normal --minimum-expected-tests 1 --report-xunit-trx --coverlet --coverlet-output-format cobertura --coverlet-include "[Just.PreciseMath]*" - name: Upload test and coverage results uses: actions/upload-artifact@v3 if: ${{ always() }} with: name: test-results path: | 1-tests/**/TestResults/**/*.trx 1-tests/**/TestResults/**/*cobertura*.xml retention-days: 3