Skip to content

Commit 91d39b8

Browse files
Update .npmrc files to use npmjs.org registry
WIP Fix
1 parent d99a4b6 commit 91d39b8

10 files changed

Lines changed: 55 additions & 48 deletions

File tree

.github/workflows/Build-Test-And-Deploy.yaml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
- name: Run .NET Tests
3737
id: run-dotnet-tests
38-
run: dotnet test --no-build --configuration Release --blame-hang-timeout 15m --blame-hang-dump-type full -l trx --results-directory ./TestResults
38+
run: dotnet test --no-build --configuration Release --blame-hang-timeout 15m --blame-hang-dump-type full -l trx --results-directory ./TestResults --filter TestType!=Integration
3939
env:
4040
POCKETLOGGER_LOG_PATH: ${{ github.workspace }}/artifacts/logs/pocketlogger.log
4141

@@ -93,7 +93,7 @@ jobs:
9393

9494
- name: Run .NET Tests
9595
id: run-dotnet-tests
96-
run: dotnet test --no-build --configuration Release --blame-hang-timeout 15m --blame-hang-dump-type full -l trx --results-directory ./TestResults
96+
run: dotnet test --no-build --configuration Release --blame-hang-timeout 15m --blame-hang-dump-type full -l trx --results-directory ./TestResults --filter TestType!=Integration
9797
env:
9898
POCKETLOGGER_LOG_PATH: ${{ github.workspace }}/artifacts/logs/pocketlogger.log
9999

@@ -106,11 +106,12 @@ jobs:
106106
artifact-name: 'windows-test-playlists'
107107

108108
integration-tests:
109-
# Integration tests use Playwright and are gated behind RunIntegrationTests=true.
110-
# IntegrationTestFactAttribute explicitly skips these tests on Linux, so a
111-
# Windows runner is required to actually execute them.
112-
runs-on: windows-latest
109+
strategy:
110+
matrix:
111+
os: [windows-latest, ubuntu-latest, macos-latest]
112+
browser: [chromium, firefox, webkit]
113113

114+
runs-on: ${{ matrix.os }}
114115
steps:
115116
- uses: actions/checkout@v6
116117

@@ -122,7 +123,7 @@ jobs:
122123

123124
- name: Run .NET Integration Tests
124125
id: run-dotnet-integration-tests
125-
run: dotnet test --no-build --configuration Release --blame-hang-timeout 15m --blame-hang-dump-type full -l trx --results-directory ./TestResults
126+
run: dotnet test --no-build --configuration Release --blame-hang-timeout 15m --blame-hang-dump-type full -l trx --results-directory ./TestResults --filter TestType=Integration
126127
env:
127128
RunIntegrationTests: true
128129
POCKETLOGGER_LOG_PATH: ${{ github.workspace }}/artifacts/logs/pocketlogger.log
@@ -224,8 +225,8 @@ jobs:
224225
uses: docker/login-action@v3
225226
with:
226227
registry: ${{ vars.PRODCONTAINER_REGISTRY }}
227-
username: ${{ secrets.ESSENTIALCSHARP_CLIENT_ID }}
228-
password: ${{ secrets.ESSENTIALCSHARP_CLIENT_SECRET }}
228+
username: ${{ secrets.ESSENTIALCSHARP_ACR_USERNAME }}
229+
password: ${{ secrets.ESSENTIALCSHARP_ACR_PASSWORD }}
229230

230231
- name: Push Image to Container Registry
231232
run: docker push --all-tags ${{ vars.PRODCONTAINER_REGISTRY }}/try
@@ -242,4 +243,4 @@ jobs:
242243
with:
243244
inlineScript: |
244245
az config set extension.use_dynamic_install=yes_without_prompt
245-
az containerapp up -n $CONTAINER_APP_NAME -g $RESOURCEGROUP --image $REGISTRY_URL/try:${{ github.sha }} --environment $CONTAINER_APP_ENVIRONMENT --registry-server $REGISTRY_URL --ingress external --target-port 80 --debug
246+
az containerapp up -n $CONTAINER_APP_NAME -g $RESOURCEGROUP --image $REGISTRY_URL/try:${{ github.sha }} --environment $CONTAINER_APP_ENVIRONMENT --registry-server $REGISTRY_URL --ingress external --registry-username $ACR_USERNAME --registry-password $ACR_PASSWORD --target-port 80 --debug

src/Microsoft.TryDotNet.IntegrationTests/EditorTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
namespace Microsoft.TryDotNet.IntegrationTests;
1616

1717
[LogToPocketLogger(FileNameEnvironmentVariable = "POCKETLOGGER_LOG_PATH")]
18+
[Trait("TestType", "Integration")]
1819
public class EditorTests : PlaywrightTestBase
1920
{
2021
public EditorTests(IntegratedServicesFixture services, ITestOutputHelper output) : base(services, output)
Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
// Copyright (c) .NET Foundation and contributors. All rights reserved.
2-
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3-
4-
using System;
5-
using System.Runtime.InteropServices;
6-
7-
using Xunit;
8-
9-
namespace Microsoft.TryDotNet.IntegrationTests
10-
{
11-
internal class IntegrationTestFactAttribute : FactAttribute
12-
{
13-
private const string EnvironmentVariableName = "RunIntegrationTests";
14-
15-
public IntegrationTestFactAttribute(string? skipReason = null)
16-
{
17-
var variableValue = Environment.GetEnvironmentVariable(EnvironmentVariableName) ?? "false";
18-
switch (variableValue.ToLowerInvariant())
19-
{
20-
case "1":
21-
case "true":
22-
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
23-
{
24-
Skip = string.IsNullOrWhiteSpace(skipReason) ? "Ignored on Linux" : skipReason;
25-
}
26-
break;
27-
default:
28-
Skip = $"Skipping integration tests because environment variable '{EnvironmentVariableName}' was not 'true' or '1'.";
29-
break;
30-
}
31-
}
32-
}
33-
}
1+
// Copyright (c) .NET Foundation and contributors. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
4+
using System;
5+
using System.Runtime.InteropServices;
6+
7+
using Xunit;
8+
9+
namespace Microsoft.TryDotNet.IntegrationTests
10+
{
11+
internal class IntegrationTestFactAttribute : FactAttribute
12+
{
13+
private const string EnvironmentVariableName = "RunIntegrationTests";
14+
15+
public IntegrationTestFactAttribute(string? skipReason = null)
16+
{
17+
var variableValue = Environment.GetEnvironmentVariable(EnvironmentVariableName) ?? "false";
18+
switch (variableValue.ToLowerInvariant())
19+
{
20+
case "1":
21+
case "true":
22+
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
23+
{
24+
Skip = string.IsNullOrWhiteSpace(skipReason) ? "Ignored on Linux" : skipReason;
25+
}
26+
break;
27+
default:
28+
Skip = $"Skipping integration tests because environment variable '{EnvironmentVariableName}' was not 'true' or '1'.";
29+
break;
30+
}
31+
}
32+
}
33+
}

src/Microsoft.TryDotNet.IntegrationTests/Microsoft.TryDotNet.IntegrationTests.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
<DebugType>embedded</DebugType>
1111
</PropertyGroup>
1212

13+
<ItemGroup>
14+
<Using Include="Xunit" />
15+
</ItemGroup>
16+
1317
<ItemGroup>
1418
<PackageReference Include="Assent" />
1519
<PackageReference Include="AwesomeAssertions" />
@@ -71,6 +75,5 @@ public static class BuildProperties
7175
<Target Name="PublishTool" BeforeTargets="CoreCompile" Condition="'$(DisableArcade)' != '1'">
7276
<Exec Command="dotnet publish -o $(PublishLocation)" WorkingDirectory="$(MSBuildThisFileDirectory)..\Microsoft.TryDotNet" />
7377
</Target>
74-
7578
</Project>
7679

src/Microsoft.TryDotNet.IntegrationTests/TryDotNetJsIntegrationTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
namespace Microsoft.TryDotNet.IntegrationTests;
1515

1616
[LogToPocketLogger(FileNameEnvironmentVariable = "POCKETLOGGER_LOG_PATH")]
17+
[Trait("TestType", "Integration")]
1718
public class TryDotNetJsIntegrationTests : PlaywrightTestBase
1819
{
1920
public TryDotNetJsIntegrationTests(IntegratedServicesFixture services, ITestOutputHelper output) : base(services, output)

src/Microsoft.TryDotNet.IntegrationTests/WasmRunnerTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Microsoft.TryDotNet.IntegrationTests;
1313

1414
[LogToPocketLogger(FileNameEnvironmentVariable = "POCKETLOGGER_LOG_PATH")]
15+
[Trait("TestType", "Integration")]
1516
public class WasmRunnerTests : PlaywrightTestBase
1617
{
1718
public WasmRunnerTests(IntegratedServicesFixture services, ITestOutputHelper output) : base(services, output)

src/microsoft-learn-mock/.npmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
;registry=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/
1+
registry= https://registry.npmjs.org/
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
@microsoft:registry=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/npm/registry/
2-
;registry=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/
2+
registry= https://registry.npmjs.org/
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
;registry=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/
1+
registry= https://registry.npmjs.org/

src/microsoft-trydotnet/.npmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
@microsoft:registry=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/npm/registry/
2-
;registry=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/
2+
registry= https://registry.npmjs.org/

0 commit comments

Comments
 (0)