Files
Just.Core/.gitea/workflows/test-dotnet.yaml
just d11c74e5d6
All checks were successful
.NET Test / .NET tests (push) Successful in 2m44s
.NET Publish / publish (push) Successful in 51s
setup multiple dotnet versions
2025-11-11 21:53:10 +04:00

61 lines
1.7 KiB
YAML

name: .NET Test
on:
push:
branches: [ main ]
tags-ignore:
- '**'
paths-ignore:
- 'README.md'
- '.gitea/workflows/publish-*.yaml'
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
name: .NET tests
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
steps:
- uses: actions/checkout@v5
- name: Setup .NET
uses: https://github.com/actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
10.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build .NET 10.0
run: dotnet build --no-restore --framework net10.0 --configuration Release ./Core.Tests/Core.Tests.csproj
- name: Build .NET 9.0
run: dotnet build --no-restore --framework net9.0 --configuration Release ./Core.Tests/Core.Tests.csproj
- name: Build .NET 8.0
run: dotnet build --no-restore --framework net8.0 --configuration Release ./Core.Tests/Core.Tests.csproj
- name: Test .NET 10.0
run: dotnet run --no-build --framework net10.0 --configuration Release --project ./Core.Tests/Core.Tests.csproj -- -trx TestResults/results-net10.trx
- name: Test .NET 9.0
run: dotnet run --no-build --framework net9.0 --configuration Release --project ./Core.Tests/Core.Tests.csproj -- -trx TestResults/results-net9.trx
- name: Test .NET 8.0
run: dotnet run --no-build --framework net8.0 --configuration Release --project ./Core.Tests/Core.Tests.csproj -- -trx TestResults/results-net8.trx
- name: Upload dotnet test results
uses: actions/upload-artifact@v3
with:
name: test-results
path: TestResults
if: ${{ always() }}
retention-days: 30