Skip to content

Commit e47629f

Browse files
authored
exclude browser stress tests from default ci (#118)
1 parent 2cf1b9c commit e47629f

File tree

7 files changed

+21
-2
lines changed

7 files changed

+21
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
run: dotnet playwright -p Tests/ManagedCode.Storage.Tests/ManagedCode.Storage.Tests.csproj install chromium
4040

4141
- name: Test
42-
run: dotnet test Tests/ManagedCode.Storage.Tests/ManagedCode.Storage.Tests.csproj --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage"
42+
run: dotnet test Tests/ManagedCode.Storage.Tests/ManagedCode.Storage.Tests.csproj --configuration Release --no-build --verbosity normal --filter "Category!=BrowserStress" --collect:"XPlat Code Coverage"
4343

4444
- name: Upload coverage reports to Codecov
4545
uses: codecov/codecov-action@v5

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
run: dotnet playwright -p Tests/ManagedCode.Storage.Tests/ManagedCode.Storage.Tests.csproj install chromium
4646

4747
- name: Test
48-
run: dotnet test Tests/ManagedCode.Storage.Tests/ManagedCode.Storage.Tests.csproj --configuration Release --no-build --verbosity normal
48+
run: dotnet test Tests/ManagedCode.Storage.Tests/ManagedCode.Storage.Tests.csproj --configuration Release --no-build --verbosity normal --filter "Category!=BrowserStress"
4949

5050
- name: Pack NuGet packages
5151
run: dotnet pack ManagedCode.Storage.slnx --configuration Release --no-build -p:IncludeSymbols=false -p:SymbolPackageFormat=snupkg --output ./artifacts

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,4 +327,5 @@ Ask first:
327327
### Dislikes
328328

329329
- Template-generated scaffolding in tests; keep test hosts and verification surfaces minimal, hand-written, and purpose-built.
330+
- CI regressions that inflate `build-and-test` far beyond the historical baseline; browser large-file coverage must stay meaningful without turning the default GitHub Actions path into a 30+ minute run.
330331
- Unnecessary product-code fallbacks; prefer one clear production path unless backward compatibility is an explicit requirement for the task.

Tests/ManagedCode.Storage.Tests/Storages/Browser/BrowserServerStorageIntegrationTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public async Task BrowserStorage_ServerHost_TextFlow_ShouldPersistListAndDelete(
5757

5858
[Fact]
5959
[Trait("Category", "LargeFile")]
60+
[Trait("Category", "BrowserStress")]
6061
public async Task BrowserStorage_ServerHost_LargeFlow_ShouldPersistAcrossPages()
6162
{
6263
const int chunkedPayloadSizeMiB = 1024;

Tests/ManagedCode.Storage.Tests/Storages/Browser/BrowserWasmStorageIntegrationTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public async Task BrowserStorage_WasmHost_TextFlow_ShouldPersistListAndDelete()
5757

5858
[Fact]
5959
[Trait("Category", "LargeFile")]
60+
[Trait("Category", "BrowserStress")]
6061
public async Task BrowserStorage_WasmHost_LargeFlow_ShouldPersistAcrossPages()
6162
{
6263
const int chunkedPayloadSizeMiB = 1024;

docs/Development/setup.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,6 @@ dotnet format ManagedCode.Storage.slnx
5757

5858
- Start Docker Desktop (or your Docker daemon) before running the full test suite.
5959
- AWS and Orleans integration tests intentionally pin LocalStack to `localstack/localstack:4.14.0`; do not switch them back to `latest`, because the end-of-March 2026 `latest` image became auth-gated and breaks CI without a token.
60+
- GitHub Actions `build-and-test` and `Release` intentionally exclude `Category=BrowserStress`; run that browser-hosted `1 GiB` stress lane locally with `dotnet test ... --filter "Category=BrowserStress"` when you specifically need it.
6061
- Never commit secrets (cloud keys, OAuth tokens, connection strings). Use environment variables or user secrets.
6162
- Credentials for cloud-drive providers are documented in `docs/Development/credentials.md`.

docs/Testing/strategy.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Where possible, tests run without real cloud accounts:
5656
Some tests are marked as “large file” to validate streaming behaviour:
5757

5858
- `[Trait("Category", "LargeFile")]`
59+
- Browser-hosted `1 GiB` stress flows also carry `[Trait("Category", "BrowserStress")]`.
5960

6061
Run everything (canonical):
6162

@@ -77,6 +78,20 @@ Skip large-file tests when iterating:
7778
dotnet test Tests/ManagedCode.Storage.Tests/ManagedCode.Storage.Tests.csproj --configuration Release --filter "Category!=LargeFile"
7879
```
7980

81+
Skip the hosted-browser stress lane while still running the default fast browser coverage:
82+
83+
```bash
84+
dotnet test Tests/ManagedCode.Storage.Tests/ManagedCode.Storage.Tests.csproj --configuration Release --filter "Category!=BrowserStress"
85+
```
86+
87+
Run only the hosted-browser `1 GiB` stress lane locally when you explicitly need it:
88+
89+
```bash
90+
dotnet test Tests/ManagedCode.Storage.Tests/ManagedCode.Storage.Tests.csproj --configuration Release --filter "Category=BrowserStress"
91+
```
92+
93+
GitHub-hosted `build-and-test` and `Release` workflows intentionally exclude `Category=BrowserStress` so mainline CI stays near the historical runtime instead of spending 30+ minutes on Chromium-hosted `1 GiB` OPFS stress flows that are not stable on shared runners.
94+
8095
## Quality Rules
8196

8297
- Each test must assert concrete, observable behaviour (state/output/errors/side-effects).

0 commit comments

Comments
 (0)