更新readme文件 #14
This file contains hidden or 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: AbilityKit Test Gates | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - master | |
| - develop | |
| push: | |
| branches: | |
| - main | |
| - master | |
| - develop | |
| workflow_dispatch: | |
| inputs: | |
| gate: | |
| description: Test gate to run manually. | |
| required: false | |
| default: regression | |
| type: choice | |
| options: | |
| - precheck | |
| - moba-console-smoke | |
| - runtime-contracts | |
| - regression | |
| schedule: | |
| # Runs at 02:00 Asia/Shanghai every day. | |
| - cron: '0 18 * * *' | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: abilitykit-test-gates-${{ github.event_name }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| precheck: | |
| name: P0 precheck | |
| runs-on: windows-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Run P0 precheck gate | |
| shell: powershell | |
| run: >- | |
| powershell -ExecutionPolicy Bypass -File tools\run_test_gate.ps1 | |
| -Gate precheck | |
| -CI | |
| -ResultsDirectory artifacts\test-gates\precheck | |
| - name: Upload P0 precheck artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: abilitykit-test-gates-precheck | |
| path: artifacts/test-gates/precheck | |
| if-no-files-found: warn | |
| manual-or-scheduled-regression: | |
| name: P2 manual or scheduled regression | |
| runs-on: windows-latest | |
| timeout-minutes: 90 | |
| if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Resolve manual gate | |
| shell: powershell | |
| run: | | |
| $gate = '${{ github.event.inputs.gate }}' | |
| if ([string]::IsNullOrWhiteSpace($gate)) { | |
| $gate = 'regression' | |
| } | |
| "ABILITYKIT_GATE=$gate" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
| - name: Run selected gate | |
| shell: powershell | |
| run: >- | |
| powershell -ExecutionPolicy Bypass -File tools\run_test_gate.ps1 | |
| -Gate $env:ABILITYKIT_GATE | |
| -CI | |
| -ResultsDirectory artifacts\test-gates\scheduled | |
| - name: Upload regression artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: abilitykit-test-gates-${{ env.ABILITYKIT_GATE }} | |
| path: artifacts/test-gates/scheduled | |
| if-no-files-found: warn |