Files
Just.PreciseMath/.gitea/workflows/test-dotnet.yaml
T
just cb2524980d
.NET Test / .NET tests (push) Successful in 1m9s
basic arithmetic benchmarks added
2026-09-14 00:04:39 +04:00

66 lines
1.6 KiB
YAML

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@v7
with:
persist-credentials: false
- name: Setup .NET
uses: actions/setup-dotnet@v6
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: Benchmark smoke test
run: >-
dotnet run --project 2-benchmarks/Just.PreciseMath.Benchmarks
--configuration Release --no-build -- --job Dry --filter '*'
- name: Upload test and coverage results
uses: actions/upload-artifact@v7
if: ${{ always() }}
with:
name: test-results
path: |
1-tests/**/TestResults/**/*.trx
1-tests/**/TestResults/**/*cobertura*.xml
retention-days: 3