这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
678c682
wip
colombod Mar 31, 2022
315595f
clean tests
colombod Mar 31, 2022
70742db
implement interop
colombod Mar 31, 2022
c3602e0
fix integration test
colombod Mar 31, 2022
e82bbf3
wip
colombod Mar 31, 2022
64e98de
got excited here ...
colombod Mar 31, 2022
1cff0e5
improve tests
colombod Mar 31, 2022
13e4884
simplify layout
colombod Mar 31, 2022
e60042f
changed to build for js
colombod Apr 1, 2022
7070b1c
fix git ignore file
colombod Apr 1, 2022
29c3c94
getting started with editor page generator
colombod Apr 1, 2022
604f347
better test structure
colombod Apr 1, 2022
aaa6d61
start on editor html generator
colombod Apr 1, 2022
6cb0451
remove unused import
colombod Apr 1, 2022
2c80ebd
add tests
colombod Apr 1, 2022
826ea46
generate page
colombod Apr 1, 2022
5c4270c
rename
colombod Apr 4, 2022
30d7ea6
add message layer for backward compatibility
colombod Apr 4, 2022
8349d8a
refactoring
colombod Apr 4, 2022
a9ba822
remove imports
colombod Apr 4, 2022
2596db8
fix css generation and has name in font file
colombod Apr 5, 2022
ac18e3a
improve tests
colombod Apr 5, 2022
81fb89a
wip
colombod Apr 5, 2022
74898a5
wip
colombod Apr 5, 2022
e88b6a9
wip
colombod Apr 5, 2022
5f01c6f
remove bus class
colombod Apr 6, 2022
459c55b
wip
colombod Apr 6, 2022
96857b0
push to parent
colombod Apr 6, 2022
820ef0f
stream events
colombod Apr 6, 2022
f7559e3
fix test
colombod Apr 6, 2022
218c08b
clean up
colombod Apr 6, 2022
6445933
wip
colombod Apr 6, 2022
d8d8b46
add js-only build scripts
brettfo Apr 4, 2022
d299903
allow tests to be skipped
brettfo Apr 4, 2022
091e9d2
remove xterm functionality
brettfo Apr 4, 2022
c0f04a7
update styles package
brettfo Apr 4, 2022
9c6a047
exclude fonts from signing
brettfo Apr 6, 2022
6d553a4
consolidate test packages
brettfo Apr 6, 2022
4438de4
pass test flag
brettfo Apr 6, 2022
a82a074
ensure trx gets created for npm projects
brettfo Apr 6, 2022
ef5975a
run integration tests
brettfo Apr 6, 2022
980589b
publish all screenshots to artifact container
brettfo Apr 6, 2022
8d11f57
ensure playwright is installed for tests
brettfo Apr 6, 2022
6cf0691
run integration tests on linux
brettfo Apr 6, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -379,16 +379,22 @@ docs/\.ionide/
*.bak
NotebookExamples/*/Samples/housing.csv

trydotnet.editor.js/dist/
src/microsoft-trydotnet-editor/test-results/

trydotnet.editor.js/lib/
src/microsoft-trydotnet-editor/dist/

trydotnet.editor.js/test-results/
src/microsoft-trydotnet-editor/simulatorGenerator/

src/trydotnet.editor.js/dist/
src/microsoft-trydotnet-editor/lib/

src/trydotnet.editor.js/simulatorGenerator/
src/microsoft-trydotnet/test-results/

src/Microsoft.TryDotNet/wwwroot/editor/
src/microsoft-trydotnet/dist/

src/trydotnet.editor.js/lib/
src/microsoft-trydotnet/simulatorGenerator/

src/microsoft-trydotnet/lib/

src/Microsoft.TryDotNet/wwwroot/api/

src/Microsoft.TryDotNet/wwwroot/css/trydotnet.css
2 changes: 1 addition & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

Not doing this in each project because duplicate PackageReferences causes an Arcade build failure.
-->
<ItemGroup Condition="$(MSBuildProjectName.EndsWith('.Tests')) AND '$(DisableArcade)' == '1'">
<ItemGroup Condition="($(MSBuildProjectName.EndsWith('.Tests')) OR $(MSBuildProjectName.EndsWith('.IntegrationTests'))) AND '$(DisableArcade)' == '1'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
Expand Down
6 changes: 6 additions & 0 deletions TryDotNet.v3.ncrunchsolution
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<SolutionConfiguration>
<Settings>
<AllowParallelTestExecution>True</AllowParallelTestExecution>
<SolutionConfigured>True</SolutionConfigured>
</Settings>
</SolutionConfiguration>
138 changes: 22 additions & 116 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@ variables:
value: true
- name: _DotNetArtifactsCategory
value: .NETCore
# - name: BlazorTemplateVersion
# value: 3.1.0-preview4.19579.2
- name: DotNetSdkVersion
value: '6.0.101'
# - name: DotNetSdkVersion3
# value: '3.1.300'
- name: NodeJSVersion
value: '16.13.0'
- name: TryDotNetPackagesPath
Expand Down Expand Up @@ -89,47 +85,41 @@ stages:
inputs:
versionSpec: $(NodeJSVersion)

# - task: UseDotNet@2
# displayName: Add dotnet 3.0
# inputs:
# packageType: sdk
# version: $(DotNetSdkVersion3)
# installationPath: $(Agent.ToolsDirectory)\dotnet

- task: UseDotNet@2
displayName: Add dotnet
inputs:
packageType: sdk
version: $(DotNetSdkVersion)
installationPath: $(Agent.ToolsDirectory)\dotnet

# - script: dotnet new -i Microsoft.AspNetCore.Blazor.Templates::$(BlazorTemplateVersion)
# displayName: Install Blazor templates

- script: |
robocopy "eng\resources" "$(Build.SourcesDirectory)\artifacts"
:: robocopy return codes are terrible; 1 means files were copied
if "%errorlevel%" == "1" exit /b 0
exit /b 1
displayName: Prevent test directory crawling

- pwsh: |
$testArg = if ($env:SKIPTESTS -ne "true") { "-test" } else { "" }
Write-Host "##vso[task.setvariable variable=_TestArgs]$testArg"
displayName: Promote variables

- script: eng\CIBuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
-sign
-test
$(_BuildArgs)
$(_TestArgs)
displayName: Build / Test
env:
TRYDOTNET_PACKAGES_PATH: $(TryDotNetPackagesPath)

- task: PublishTestResults@2
displayName: Publish NPM Test Results
- task: PublishBuildArtifacts@1
displayName: Publish Playwright screen shots
inputs:
testResultsFormat: 'VSTest'
testResultsFiles: '*.trx'
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
continueOnError: true
pathToPublish: $(Build.SourcesDirectory)\artifacts\bin\Microsoft.TryDotNet.IntegrationTests\Release\net6.0\playwright_screenshots
artifactName: Windows_playwright_screenshots
artifactType: container
condition: always()

- task: PublishBuildArtifacts@1
Expand All @@ -139,13 +129,6 @@ stages:
artifactName: packages
artifactType: container

# - task: PublishBuildArtifacts@1
# displayName: Publish integration tests dll
# inputs:
# pathToPublish: $(Build.SourcesDirectory)\artifacts\bin\NotIntegration.Tests\$(_BuildConfig)
# artifactName: integrationTests
# artifactType: container

- template: /eng/common/templates/jobs/jobs.yml
parameters:
enableMicrobuild: true
Expand Down Expand Up @@ -193,109 +176,32 @@ stages:
version: $(DotNetSdkVersion)
installationPath: $(Agent.ToolsDirectory)/dotnet

# - script: dotnet new -i Microsoft.AspNetCore.Blazor.Templates::$(BlazorTemplateVersion)
# displayName: Install Blazor templates

- script: |
mkdir -p "$(Build.SourcesDirectory)/artifacts"
cp eng/resources/* "$(Build.SourcesDirectory)/artifacts"
displayName: Prevent test directory crawling

- pwsh: |
$testArg = if ($env:SKIPTESTS -ne "true") { "--test" } else { "" }
Write-Host "##vso[task.setvariable variable=_TestArgs]$testArg"
displayName: Promote variables

- script: ./eng/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
--test
$(_TestArgs)
displayName: Build / Test
env:
TRYDOTNET_PACKAGES_PATH: $(TryDotNetPackagesPath)

- task: PublishTestResults@2
displayName: Publish NPM Test Results
- task: PublishBuildArtifacts@1
displayName: Publish Playwright screen shots
inputs:
testResultsFormat: 'VSTest'
testResultsFiles: '*.trx'
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
continueOnError: true
pathToPublish: $(Build.SourcesDirectory)/artifacts/bin/Microsoft.TryDotNet.IntegrationTests/Release/net6.0/playwright_screenshots
artifactName: Linux_playwright_screenshots
artifactType: container
condition: always()

# Up-to-date
- job: UpToDate_Windows
pool:
vmImage: windows-2019
steps:
- checkout: self
clean: true
- task: NodeTool@0
displayName: Add NodeJS/npm
inputs:
versionSpec: $(NodeJSVersion)
- task: UseDotNet@2
displayName: Add dotnet
inputs:
packageType: sdk
version: $(DotNetSdkVersion)
installationPath: $(Agent.ToolsDirectory)/dotnet
# - script: dotnet new -i Microsoft.AspNetCore.Blazor.Templates::$(BlazorTemplateVersion)
# displayName: Install Blazor templates

- task: PowerShell@2
displayName: Run up-to-date build check
inputs:
filePath: eng\tests\UpToDate.ps1
arguments: -configuration $(_BuildConfig) -ci

# - template: /eng/common/templates/jobs/jobs.yml
# parameters:
# enableMicrobuild: true
# jobs:
# - job: IntegrationTest
# dependsOn: Windows_NT
# condition: succeeded()
# pool:
# vmImage: ubuntu-20.04
# variables:
# - name: PACKAGESOURCE
# value: $(System.DefaultWorkingDirectory)/packages/Shipping
# - name: RUN_DOTNET_TRY_INTEGRATION_TESTS
# value: true
# - name: TryDotNetPackagesPath
# value: $(Build.SourcesDirectory)/.trydotnet/packages
# steps:
# - checkout: none #skip checking out the default repository resource
# - task: UseDotNet@2
# displayName: Add dotnet 3.0
# inputs:
# packageType: sdk
# version: $(DotNetSdkVersion)
# installationPath: $(Agent.ToolsDirectory)/dotnet

# - script: dotnet new -i Microsoft.AspNetCore.Blazor.Templates::$(BlazorTemplateVersion)
# displayName: Install Blazor templates

# - task: DownloadBuildArtifacts@0
# displayName: 'Download built packages'
# inputs:
# artifactName: packages
# downloadPath: $(System.DefaultWorkingDirectory)

# - task: DownloadBuildArtifacts@0
# displayName: 'Download built integrationtests'
# inputs:
# artifactName: integrationTests
# downloadPath: $(System.DefaultWorkingDirectory)

# - script: dotnet vstest $(System.DefaultWorkingDirectory)/integrationTests/netcoreapp3.1/NotIntegration.Tests.dll --ResultsDirectory:$(System.DefaultWorkingDirectory)/testResults | tee $(Build.SourcesDirectory)\artifacts\log\$(_BuildConfig)\log.txt
# displayName: Run integration tests

# - task: PublishTestResults@2
# displayName: Publish NPM Test Results
# inputs:
# testResultsFormat: 'VSTest'
# testResultsFiles: '*.trx'
# searchFolder: '$(SystemWorkingDirectory)/testResults'
# continueOnError: true
# condition: always()

#---------------------------------------------------------------------------------------------------------------------#
# Post Build #
#---------------------------------------------------------------------------------------------------------------------#
Expand Down
2 changes: 2 additions & 0 deletions build-js.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
powershell -noprofile -executionPolicy RemoteSigned -file "%~dp0eng\build.ps1" -noDotnet %*
16 changes: 16 additions & 0 deletions build-js.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

source="${BASH_SOURCE[0]}"

# resolve $SOURCE until the file is no longer a symlink
while [[ -h $source ]]; do
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
source="$(readlink "$source")"

# if $source was a relative symlink, we need to resolve it relative to the path where
# the symlink file was located
[[ $source != /* ]] && source="$scriptroot/$source"
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd)"

. "$scriptroot/eng/build.sh" --no-dotnet "$@"
7 changes: 0 additions & 7 deletions dotnet-try.sln
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MLS.Agent.Tools.Tests", "ML
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Interactive.Telemetry", "Microsoft.DotNet.Interactive.Telemetry\Microsoft.DotNet.Interactive.Telemetry.csproj", "{B71E2FCC-3401-4D27-AA6E-9D1EBAEE013C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.TryDotNet", "Microsoft.TryDotNet\Microsoft.TryDotNet.csproj", "{AE0D921D-1875-42FC-8798-B2A484DD877E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.TryDotNet.Tests", "Microsoft.TryDotNet.Tests\Microsoft.TryDotNet.Tests.csproj", "{89D7BB28-A5A2-419B-A4CD-AFF22CA546DF}"
EndProject
Global
Expand Down Expand Up @@ -149,10 +147,6 @@ Global
{B71E2FCC-3401-4D27-AA6E-9D1EBAEE013C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B71E2FCC-3401-4D27-AA6E-9D1EBAEE013C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B71E2FCC-3401-4D27-AA6E-9D1EBAEE013C}.Release|Any CPU.Build.0 = Release|Any CPU
{AE0D921D-1875-42FC-8798-B2A484DD877E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AE0D921D-1875-42FC-8798-B2A484DD877E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AE0D921D-1875-42FC-8798-B2A484DD877E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AE0D921D-1875-42FC-8798-B2A484DD877E}.Release|Any CPU.Build.0 = Release|Any CPU
{89D7BB28-A5A2-419B-A4CD-AFF22CA546DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{89D7BB28-A5A2-419B-A4CD-AFF22CA546DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{89D7BB28-A5A2-419B-A4CD-AFF22CA546DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -184,7 +178,6 @@ Global
{EA6DDD48-941D-43C6-BAC1-07CF24F4C792} = {8192FEAD-BCE6-4E62-97E5-2E9EA884BD71}
{0F8F3C1A-F1D3-4476-9E5B-219BBAC8DBC6} = {8192FEAD-BCE6-4E62-97E5-2E9EA884BD71}
{B71E2FCC-3401-4D27-AA6E-9D1EBAEE013C} = {6EE8F484-DFA2-4F0F-939F-400CE78DFAC2}
{AE0D921D-1875-42FC-8798-B2A484DD877E} = {6EE8F484-DFA2-4F0F-939F-400CE78DFAC2}
{89D7BB28-A5A2-419B-A4CD-AFF22CA546DF} = {8192FEAD-BCE6-4E62-97E5-2E9EA884BD71}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
Expand Down
4 changes: 3 additions & 1 deletion eng/Signing.props
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@
<FileSignInfo Include="Serilog.Sinks.RollingFileAlternate.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="XPlot.Plotly.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="MessagePack.Annotations.dll" CertificateName="3PartySHA2" />

<FileSignInfo Include="materialdesignicons-webfont.ttf" CertificateName="None" />
<FileSignInfo Include="9648f5fce667f351b0ca.ttf" CertificateName="None" />
<FileSignInfo Include="trydotnet__codicon.ttf" CertificateName="None" />
</ItemGroup>

</Project>
62 changes: 45 additions & 17 deletions eng/build.ps1
Original file line number Diff line number Diff line change
@@ -1,26 +1,54 @@
[CmdletBinding(PositionalBinding = $false)]
param (
[switch]$ci,
[switch]$noDotnet,
[switch]$test,
[Parameter(ValueFromRemainingArguments = $true)][String[]]$arguments
)

Set-StrictMode -version 2.0
$ErrorActionPreference = "Stop"

function TestUsingNPM([string] $testPath) {
Write-Host "Installing packages"
Start-Process -PassThru -WindowStyle Hidden -WorkingDirectory $testPath -Wait npm "i"
Write-Host "Testing"
$test = Start-Process -PassThru -WindowStyle Hidden -WorkingDirectory $testPath -Wait npm "run ciTest"
Write-Host "Done with code $($test.ExitCode)"
return $test.ExitCode
}

try {
# invoke regular build/test script
. (Join-Path $PSScriptRoot "common\build.ps1") /p:Projects=$PSScriptRoot\..\TryDotNet.sln @args
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
$repoRoot = Resolve-Path "$PSScriptRoot\.."
$npmDirs = @(
"src\microsoft-trydotnet",
"src\microsoft-trydotnet-editor",
"src\microsoft-trydotnet-styles"
)
foreach ($npmDir in $npmDirs) {
Push-Location "$repoRoot\$npmDir"
Write-Host "Building NPM in directory $npmDir"
npm ci
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
npm run buildProd
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }

if ($test) {
Write-Host "Testing NPM in directory $npmDir"
npm run ciTest
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
}

Pop-Location
}

# directly invoke npm tests
if (($null -ne $args) -and ($args.Contains("-test") -or $args.Contains("-t"))) {
TestUsingNPM "$PSScriptRoot\..\Microsoft.DotNet.Try.Client"
TestUsingNPM "$PSScriptRoot\..\Microsoft.DotNet.Try.js"
if (-Not $noDotnet) {
# promote switches to arguments
if ($ci) {
$arguments += "-ci"
}
if ($test) {
$arguments += '-test'
$arguments += '-integrationTest'
}

# invoke regular build/test script
$buildScript = (Join-Path $PSScriptRoot "common\build.ps1")
Invoke-Expression "$buildScript -projects ""$PSScriptRoot\..\TryDotNet.sln"" $arguments"
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
}
}
catch {
Expand Down
Loading