|
6 | 6 | paths: |
7 | 7 | - 'src/**' |
8 | 8 | - 'samples/**' |
| 9 | + - 'tests/**' |
9 | 10 | - '.github/workflows/build.yml' |
10 | 11 | pull_request: |
11 | 12 | branches: [main] |
12 | 13 | paths: |
13 | 14 | - 'src/**' |
14 | 15 | - 'samples/**' |
| 16 | + - 'tests/**' |
15 | 17 | - '.github/workflows/build.yml' |
16 | 18 |
|
17 | 19 | jobs: |
|
39 | 41 | - name: Build Sample Extension |
40 | 42 | run: dotnet build samples/SampleExtension/SampleExtension.csproj -c Release |
41 | 43 |
|
| 44 | + # E2E Tests - Build all test projects |
| 45 | + - name: Build E2E.Minimal |
| 46 | + run: dotnet build tests/e2e/E2E.Minimal/E2E.Minimal.csproj -c Release |
| 47 | + |
| 48 | + - name: Build E2E.AutoIncludes |
| 49 | + run: dotnet build tests/e2e/E2E.AutoIncludes/E2E.AutoIncludes.csproj -c Release |
| 50 | + |
| 51 | + - name: Build E2E.SourceGenerators |
| 52 | + run: dotnet build tests/e2e/E2E.SourceGenerators/E2E.SourceGenerators.csproj -c Release |
| 53 | + |
| 54 | + - name: Build E2E.VersionOverride |
| 55 | + run: dotnet build tests/e2e/E2E.VersionOverride/E2E.VersionOverride.csproj -c Release |
| 56 | + |
| 57 | + - name: Build E2E.VersionOverride with SetVsixVersion |
| 58 | + run: dotnet build tests/e2e/E2E.VersionOverride/E2E.VersionOverride.csproj -c Release -p:SetVsixVersion=2.0.0 |
| 59 | + |
| 60 | + - name: Build E2E.CustomPkgDef |
| 61 | + run: dotnet build tests/e2e/E2E.CustomPkgDef/E2E.CustomPkgDef.csproj -c Release |
| 62 | + |
| 63 | + - name: Build E2E.ManualPkgDef |
| 64 | + run: dotnet build tests/e2e/E2E.ManualPkgDef/E2E.ManualPkgDef.csproj -c Release |
| 65 | + |
| 66 | + - name: Build E2E.ImageAndContentManifest |
| 67 | + run: dotnet build tests/e2e/E2E.ImageAndContentManifest/E2E.ImageAndContentManifest.csproj -c Release |
| 68 | + |
| 69 | + - name: Build E2E.Validation (expect warnings) |
| 70 | + run: dotnet build tests/e2e/E2E.Validation/E2E.Validation.csproj -c Release |
| 71 | + |
| 72 | + - name: Build E2E.ValidationNoManifest (expect warnings) |
| 73 | + run: dotnet build tests/e2e/E2E.ValidationNoManifest/E2E.ValidationNoManifest.csproj -c Release |
| 74 | + |
| 75 | + - name: Build E2E.Templates.AutoDiscovery |
| 76 | + run: dotnet build tests/e2e/E2E.Templates.AutoDiscovery/E2E.Templates.AutoDiscovery.csproj -c Release |
| 77 | + |
| 78 | + - name: Build E2E.Templates.PreBuiltZip |
| 79 | + run: dotnet build tests/e2e/E2E.Templates.PreBuiltZip/E2E.Templates.PreBuiltZip.csproj -c Release |
| 80 | + |
| 81 | + - name: Build E2E.Templates.CrossProjectRef |
| 82 | + run: dotnet build tests/e2e/E2E.Templates.CrossProjectRef/E2E.Templates.CrossProjectRef.csproj -c Release |
| 83 | + |
| 84 | + - name: Build E2E.Templates.ManualWithSubPath |
| 85 | + run: dotnet build tests/e2e/E2E.Templates.ManualWithSubPath/E2E.Templates.ManualWithSubPath.csproj -c Release |
| 86 | + |
| 87 | + - name: Build E2E.AllFeatures |
| 88 | + run: dotnet build tests/e2e/E2E.AllFeatures/E2E.AllFeatures.csproj -c Release |
| 89 | + |
| 90 | + # VSIX Verification - Check that VSIX files contain expected content |
| 91 | + - name: Verify E2E.Minimal VSIX |
| 92 | + run: | |
| 93 | + $vsix = "tests/e2e/E2E.Minimal/bin/Release/E2E.Minimal.vsix" |
| 94 | + if (!(Test-Path $vsix)) { throw "VSIX not found: $vsix" } |
| 95 | + Expand-Archive -Path $vsix -DestinationPath "tests/e2e/E2E.Minimal/vsix-contents" -Force |
| 96 | + $files = Get-ChildItem -Path "tests/e2e/E2E.Minimal/vsix-contents" -Recurse -File | Select-Object -ExpandProperty Name |
| 97 | + if ($files -notcontains "extension.vsixmanifest") { throw "Missing extension.vsixmanifest" } |
| 98 | + if ($files -notcontains "E2E.Minimal.dll") { throw "Missing E2E.Minimal.dll" } |
| 99 | + Write-Host "E2E.Minimal VSIX verified successfully" |
| 100 | +
|
| 101 | + - name: Verify E2E.Templates.AutoDiscovery VSIX |
| 102 | + run: | |
| 103 | + $vsix = "tests/e2e/E2E.Templates.AutoDiscovery/bin/Release/E2E.Templates.AutoDiscovery.vsix" |
| 104 | + if (!(Test-Path $vsix)) { throw "VSIX not found: $vsix" } |
| 105 | + Expand-Archive -Path $vsix -DestinationPath "tests/e2e/E2E.Templates.AutoDiscovery/vsix-contents" -Force |
| 106 | + $files = Get-ChildItem -Path "tests/e2e/E2E.Templates.AutoDiscovery/vsix-contents" -Recurse | Select-Object -ExpandProperty Name |
| 107 | + if ($files -notcontains "ConsoleApp.zip") { throw "Missing ProjectTemplates/ConsoleApp.zip" } |
| 108 | + if ($files -notcontains "NewClass.zip") { throw "Missing ItemTemplates/NewClass.zip" } |
| 109 | + Write-Host "E2E.Templates.AutoDiscovery VSIX verified successfully" |
| 110 | +
|
| 111 | + - name: Verify E2E.AllFeatures VSIX |
| 112 | + run: | |
| 113 | + $vsix = "tests/e2e/E2E.AllFeatures/bin/Release/E2E.AllFeatures.vsix" |
| 114 | + if (!(Test-Path $vsix)) { throw "VSIX not found: $vsix" } |
| 115 | + Expand-Archive -Path $vsix -DestinationPath "tests/e2e/E2E.AllFeatures/vsix-contents" -Force |
| 116 | + $files = Get-ChildItem -Path "tests/e2e/E2E.AllFeatures/vsix-contents" -Recurse | Select-Object -ExpandProperty Name |
| 117 | + if ($files -notcontains "extension.vsixmanifest") { throw "Missing extension.vsixmanifest" } |
| 118 | + if ($files -notcontains "E2E.AllFeatures.dll") { throw "Missing E2E.AllFeatures.dll" } |
| 119 | + Write-Host "E2E.AllFeatures VSIX verified successfully" |
| 120 | +
|
42 | 121 | - name: Test Template - Install |
43 | 122 | run: dotnet new install artifacts/packages/CodingWithCalvin.VsixSdk.Templates.1.0.0.nupkg |
44 | 123 |
|
|
0 commit comments