Skip to content

Commit 3258844

Browse files
committed
clean up
1 parent b0892f4 commit 3258844

3 files changed

Lines changed: 242 additions & 195 deletions

File tree

.github/workflows/mvp-modernized-ci.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,26 @@ jobs:
4949
- name: Run Unit Tests
5050
run: dotnet test ${{ env.PROJECT_PATH }}/ProductApp.Tests/ProductApp.Tests.csproj --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=unit-test-results.trx" --logger "console;verbosity=detailed" --collect:"XPlat Code Coverage" --blame --blame-hang-timeout 5m
5151

52-
# E2E Tests with proper Playwright setup
52+
# E2E Tests with proper Playwright setup and web app hosting
53+
- name: Build Web Application (for E2E tests)
54+
run: dotnet build ${{ env.PROJECT_PATH }}/ProductApp.Web/ProductApp.Web.csproj --configuration Debug --no-restore
55+
5356
- name: Build E2E Tests Project
5457
run: dotnet build ${{ env.PROJECT_PATH }}/ProductApp.Tests.E2E/ProductApp.Tests.E2E.csproj --configuration Release
5558

56-
- name: Install Playwright
59+
- name: Install Playwright Browsers
5760
run: |
5861
cd ${{ env.PROJECT_PATH }}/ProductApp.Tests.E2E
59-
dotnet tool install --global Microsoft.Playwright.CLI
60-
playwright install chromium
62+
dotnet tool install --global Microsoft.Playwright.CLI || true
63+
playwright install chromium --with-deps
6164
shell: bash
6265

63-
- name: Run E2E Tests
64-
run: dotnet test ${{ env.PROJECT_PATH }}/ProductApp.Tests.E2E/ProductApp.Tests.E2E.csproj --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=e2e-test-results.trx" --logger "console;verbosity=detailed" --collect:"XPlat Code Coverage" --blame --blame-hang-timeout 10m
66+
- name: Run E2E Tests (with integrated web app)
67+
run: dotnet test ${{ env.PROJECT_PATH }}/ProductApp.Tests.E2E/ProductApp.Tests.E2E.csproj --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=e2e-test-results.trx" --logger "console;verbosity=detailed" --collect:"XPlat Code Coverage" --blame --blame-hang-timeout 15m
6568
env:
6669
ASPNETCORE_ENVIRONMENT: Development
70+
DOTNET_ENVIRONMENT: Development
71+
CI: true
6772

6873
- name: Upload test results
6974
uses: actions/upload-artifact@v4

source/MVPModernized/ProductApp.Tests.E2E/ProductApp.Tests.E2E.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<IsPackable>false</IsPackable>
77
<IsTestProject>true</IsTestProject>
88
</PropertyGroup>
9-
9+
1010
<ItemGroup>
1111
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
1212
<PackageReference Include="Microsoft.Playwright" Version="1.54.0" />
@@ -20,9 +20,9 @@
2020
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2121
</PackageReference>
2222
</ItemGroup>
23-
24-
<!-- No project references needed for E2E tests -->
25-
23+
24+
<!-- No project references needed - we start the web app as external process -->
25+
2626
<ItemGroup>
2727
<Using Include="Xunit" />
2828
</ItemGroup>

0 commit comments

Comments
 (0)