mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-03-20 15:41:40 -04:00
63 lines
1.9 KiB
YAML
63 lines
1.9 KiB
YAML
name: .NET E2E Client Tests (Playwright with Sharding)
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
jobs:
|
|
client-tests:
|
|
timeout-minutes: 60
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
shard: [1, 2, 3, 4, 5]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: 8.0.304
|
|
|
|
- name: Install dependencies
|
|
run: dotnet workload install wasm-tools
|
|
|
|
- name: Build
|
|
run: dotnet build
|
|
|
|
- name: Ensure browsers are installed
|
|
run: pwsh src/Tests/AliasVault.E2ETests/bin/Debug/net8.0/playwright.ps1 install --with-deps
|
|
|
|
- name: Run ClientTests with retry (Shard ${{ matrix.shard }})
|
|
uses: nick-fields/retry@v3
|
|
with:
|
|
timeout_minutes: 60
|
|
max_attempts: 3
|
|
command: dotnet test src/Tests/AliasVault.E2ETests --no-build --verbosity normal --filter "FullyQualifiedName~.ClientTests.Shard${{ matrix.shard }}."
|
|
|
|
- name: Upload Test Results
|
|
if: always()
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: client-test-results-shard-${{ matrix.shard }}
|
|
path: TestResults-Client-Shard-${{ matrix.shard }}.xml
|
|
|
|
publish-test-results:
|
|
name: "Publish Test Results"
|
|
needs: client-tests
|
|
runs-on: ubuntu-latest
|
|
if: always()
|
|
steps:
|
|
- name: Download Artifacts
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
path: artifacts
|
|
|
|
- name: Publish Test Results
|
|
uses: EnricoMi/publish-unit-test-result-action@v2
|
|
with:
|
|
nunit_files: "artifacts/**/*.xml"
|