增加编译导演 #70
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, windows-latest] | |
# , macos-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: 👀 Test & Pack Codecov - RefAssemblyUT | |
run: dotnet test "./test/ut/CompileUnit/RefAssemblyUT/RefAssemblyUT.csproj" --nologo -f net6.0 -c Release -l "trx;LogFileName=RefAssemblyUT.trx" --results-directory "TestResults" --collect:"XPlat Code Coverage" | |
- name: 📶 Push to Codecov | |
if: matrix.os == 'ubuntu-latest' | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.COVERAGE_KEY }} | |
directory: TestResults | |
- name: 🚦 RefAssemblyUT UT Test Not on ubuntu-latest | |
if: matrix.os != 'ubuntu-latest' | |
run: dotnet test './test/ut/CompileUnit/RefAssemblyUT' --nologo -c Release -l "trx;LogFileName=RefAssemblyUT.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 |