更新 .NET8 版本并修复UT测试 #24
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: UT Test From PR | |
on: | |
pull_request: | |
types: [opened] | |
branches: | |
- dev** | |
jobs: | |
run: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 🔨 Setup .NET SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
3.1.x | |
6.0.x | |
8.0.x | |
- name: 🚦 NatashaFunctionUT UT Test | |
run: dotnet test './test/ut/NatashaFunctionUT' --nologo -c Release -l "trx;LogFileName=NatashaFunctionUT.trx" --results-directory "TestResults" | |
- name: Publish Test Results | |
if: matrix.os == 'ubuntu-latest' | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
with: | |
check_name: 'UT Test - Ubuntu' | |
files: | | |
TestResults/**/*.trx | |
- name: Publish Test Results | |
if: matrix.os == 'macos-latest' | |
uses: EnricoMi/publish-unit-test-result-action/composite@v2 | |
with: | |
check_name: 'UT Test - Macos' | |
files: | | |
TestResults/**/*.trx | |
- name: Publish Test Results | |
if: matrix.os == 'windows-latest' | |
uses: EnricoMi/publish-unit-test-result-action/composite@v2 | |
with: | |
check_name: 'UT Test - Windows' | |
files: | | |
TestResults/**/*.trx |