mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 18:47:55 +08:00
90 lines
3.2 KiB
YAML
90 lines
3.2 KiB
YAML
name: MAAUnified Quick Tests
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
paths:
|
|
- ".github/workflows/ci-avalonia.yml"
|
|
- "src/MAAUnified/**"
|
|
- "!**/*.md"
|
|
push:
|
|
branches:
|
|
- dev-v2
|
|
paths:
|
|
- ".github/workflows/ci-avalonia.yml"
|
|
- "src/MAAUnified/**"
|
|
- "!**/*.md"
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.head.repo.full_name || github.repository }}-${{ github.head_ref || github.ref_name }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
name: .NET Tests (${{ matrix.name }})
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- name: linux-x64
|
|
os: ubuntu-latest
|
|
- name: windows-x64
|
|
os: windows-2025-vs2026
|
|
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
show-progress: false
|
|
|
|
- name: Fetch required submodules
|
|
shell: bash
|
|
run: bash ./.github/scripts/sync-optional-submodules.sh --init --depth 1 src/MAAUnified
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v5
|
|
with:
|
|
dotnet-version: "10.0.x"
|
|
|
|
- name: Restore tests
|
|
run: dotnet restore src/MAAUnified/Tests/MAAUnified.Tests.csproj
|
|
|
|
- name: Run Linux baseline consistency gate
|
|
if: matrix.name == 'linux-x64'
|
|
run: >
|
|
dotnet test src/MAAUnified/Tests/MAAUnified.Tests.csproj -c Release --no-restore --disable-build-servers -m:1
|
|
--results-directory TestResults/${{ matrix.name }}
|
|
--logger "trx;LogFileName=baseline-consistency.trx"
|
|
--filter "FullyQualifiedName~BaselineContractTests|FullyQualifiedName~BaselineCoverageTests|FullyQualifiedName~BaselineRenderSyncTests|FullyQualifiedName~ParityMatrixSyncTests"
|
|
|
|
- name: Run Linux full MAAUnified test gate
|
|
if: matrix.name == 'linux-x64'
|
|
run: >
|
|
dotnet test src/MAAUnified/Tests/MAAUnified.Tests.csproj -c Release --no-restore --disable-build-servers -m:1
|
|
--results-directory TestResults/${{ matrix.name }}
|
|
--logger "trx;LogFileName=full-maaunified-tests.trx"
|
|
|
|
- name: Run Windows platform capability contract gate
|
|
if: matrix.name == 'windows-x64'
|
|
run: >
|
|
dotnet test src/MAAUnified/Tests/MAAUnified.Tests.csproj -c Release --no-restore --disable-build-servers -m:1
|
|
--results-directory TestResults/${{ matrix.name }}
|
|
--logger "trx;LogFileName=platform-capability-contract.trx"
|
|
--filter "FullyQualifiedName~PlatformCapabilityContractTests"
|
|
|
|
- name: Run Windows native capability smoke gate
|
|
if: matrix.name == 'windows-x64'
|
|
run: >
|
|
dotnet test src/MAAUnified/Tests/MAAUnified.Tests.csproj -c Release --no-restore --disable-build-servers -m:1
|
|
--results-directory TestResults/${{ matrix.name }}
|
|
--logger "trx;LogFileName=platform-windows-native-smoke.trx"
|
|
--filter "FullyQualifiedName~PlatformWindowsNativeSmokeTests"
|
|
|
|
- name: Upload test result artifacts on failure
|
|
if: failure()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: MAAUnified-TestResults-${{ matrix.name }}
|
|
path: TestResults/${{ matrix.name }}/*.trx
|
|
if-no-files-found: ignore
|