Commit: | "); +[void]$stringBuilder.AppendLine("$AbbreviatedOid | ");
+[void]$stringBuilder.AppendLine("
Status: | "); +[void]$stringBuilder.AppendLine("$resultOverview | "); +[void]$stringBuilder.AppendLine("
Full log: | "); +[void]$stringBuilder.AppendLine("https://github.com/files-community/Files/actions/runs/$GITHUB_RUN_ID/job/$GITHUB_JOB | "); +[void]$stringBuilder.AppendLine("
" + $trxObject.TestDefinitions[0].className + "." + $item.name
+ }
+
+ [void]$stringBuilder.AppendLine("$testName`|$resultStatus`|$failedClass");
+
+ $index = $index + 1
+}
+
+$stringBuilder.ToString() | Out-File -FilePath $Destination
From 91bdbd7496e12009fe2d7919846506c9e062c6b6 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Sun, 5 Nov 2023 13:32:37 +0000
Subject: [PATCH 40/84] Update
---
scripts/Convert-TrxToMarkdown.ps1 | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/scripts/Convert-TrxToMarkdown.ps1 b/scripts/Convert-TrxToMarkdown.ps1
index 16d7d7071cf0..99b5af88098d 100644
--- a/scripts/Convert-TrxToMarkdown.ps1
+++ b/scripts/Convert-TrxToMarkdown.ps1
@@ -40,13 +40,14 @@ class TrxTimes
class TrxTestDefinition
{
- [string] $name
[string] $id
+ [string] $name
[string] $className
}
class TrxUnitTestResult
{
+ [string] $id
[string] $result
[string] $name
[string] $errorMessage
@@ -71,9 +72,9 @@ foreach ($item in $xmlDoc.TestRun.TestDefinitions.UnitTest)
{
$newOne = [TrxTestDefinition]::new()
+ $newOne.id = $item.Execution.id
$newOne.name = $item.name
- $newOne.id = $item.id
- $newOne.className = $item.TestMethod.name
+ $newOne.className = $item.TestMethod.className
$trxObject.TestDefinitions += $newOne
}
@@ -83,6 +84,7 @@ foreach ($item in $xmlDoc.TestRun.Results.UnitTestResult)
{
$newOne = [TrxUnitTestResult]::new()
+ $newOne.id = $item.executionId
$newOne.result = $item.outcome
$newOne.name = $item.testName
$newOne.errorMessage = $item.Output.ErrorInfo.Message
@@ -94,8 +96,8 @@ foreach ($item in $xmlDoc.TestRun.Results.UnitTestResult)
$stringBuilder = New-Object System.Text.StringBuilder
$title = "## Tested with Files "
-$pullRequestId = 20
-$AbbreviatedOid = "1323058"
+$pullRequestId = ${{ github.event.pull_request.number }}
+$AbbreviatedOid = $GITHUB_SHA.Substring(0, 7)
$resultOverview = ""
# Header
@@ -111,7 +113,6 @@ $unknownIcon = "⚠️"
if ($trxObject.ResultSummary.failed -ne 0 -and $trxObject.ResultSummary.passed -ne 0)
{
$resultOverview = $partialSuccessfulfulIcon + "Some tests were not successful"
- $resultOverview = + $resultOverview
}
# Passed
elseif ($trxObject.ResultSummary.failed -eq 0)
@@ -176,14 +177,15 @@ foreach ($item in $trxObject.Results)
$failedClass = "_None_"
$testName = $item.name
+ $baseClassName = $trxObject.TestDefinitions | Where-Object { $_.id -eq $item.id }
if ($null -ne $item.errorMessage)
{
- $failedClass = "" + $trxObject.TestDefinitions[0].className + "." + $item.name
+ $failedClass = "" + $baseClassName.className + "." + $item.name + "
"
}
[void]$stringBuilder.AppendLine("$testName`|$resultStatus`|$failedClass");
- $index = $index + 1
+ $index++
}
$stringBuilder.ToString() | Out-File -FilePath $Destination
From 0b4f060345597cd141baae31ff82444e020d0b53 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Sun, 5 Nov 2023 13:33:09 +0000
Subject: [PATCH 41/84] Update
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 44ade7d669ab..c8cfbbc46e5d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -166,7 +166,7 @@ jobs:
- name: Run interaction tests
run: |
dotnet test $env:AUTOMATED_TESTS_ASSEMBLY_DIR\**\Files.InteractionTests.dll
- -l:"trx;LogFileName=$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.trx"
+ --logger: "trx;LogFileName=$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.trx"
- name: TRX to MD
shell: pwsh
From fe2f5ab198bfe65c6dbb78d95ffbf4eb1035cb17 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Sun, 5 Nov 2023 13:33:41 +0000
Subject: [PATCH 42/84] Update
---
.github/workflows/ci.yml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c8cfbbc46e5d..8dce4c8aa160 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -165,14 +165,14 @@ jobs:
- name: Run interaction tests
run: |
- dotnet test $env:AUTOMATED_TESTS_ASSEMBLY_DIR\**\Files.InteractionTests.dll
+ dotnet test $env:AUTOMATED_TESTS_ASSEMBLY_DIR\**\Files.InteractionTests.dll `
--logger: "trx;LogFileName=$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.trx"
- name: TRX to MD
shell: pwsh
run: |
- . './scripts/Convert-TrxToMarkdown.ps1'
- -Source "$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.trx"
+ . './scripts/Convert-TrxToMarkdown.ps1' `
+ -Source "$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.trx" `
-Destination "$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.md"
- name: Show MD
From ed95c758619d043c53a1edd21be3cbd6c6acf668 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Sun, 5 Nov 2023 13:48:58 +0000
Subject: [PATCH 43/84] Update
---
.github/workflows/ci.yml | 4 +---
scripts/Convert-TrxToMarkdown.ps1 | 30 +++++++++++++++++++++++++++---
2 files changed, 28 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8dce4c8aa160..89dbb129caee 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -164,9 +164,7 @@ jobs:
# Waiting the tests running to finish.
- name: Run interaction tests
- run: |
- dotnet test $env:AUTOMATED_TESTS_ASSEMBLY_DIR\**\Files.InteractionTests.dll `
- --logger: "trx;LogFileName=$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.trx"
+ run: 'dotnet test $env:AUTOMATED_TESTS_ASSEMBLY_DIR\**\Files.InteractionTests.dll --logger: "trx;LogFileName=$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.trx"'
- name: TRX to MD
shell: pwsh
diff --git a/scripts/Convert-TrxToMarkdown.ps1 b/scripts/Convert-TrxToMarkdown.ps1
index 99b5af88098d..438f99eb9535 100644
--- a/scripts/Convert-TrxToMarkdown.ps1
+++ b/scripts/Convert-TrxToMarkdown.ps1
@@ -175,17 +175,41 @@ foreach ($item in $trxObject.Results)
$resultStatus = $skippedIcon + " Unknown"
}
- $failedClass = "_None_"
+ $failedClassName = "_None_"
$testName = $item.name
$baseClassName = $trxObject.TestDefinitions | Where-Object { $_.id -eq $item.id }
if ($null -ne $item.errorMessage)
{
- $failedClass = "" + $baseClassName.className + "." + $item.name + "
"
+ $failedClassName = "" + $baseClassName.className + "." + $item.name + "
"
}
- [void]$stringBuilder.AppendLine("$testName`|$resultStatus`|$failedClass");
+ [void]$stringBuilder.AppendLine("$testName`|$resultStatus`|$failedClassName");
$index++
}
+[void]$stringBuilder.AppendLine("");
+
+[void]$stringBuilder.AppendLine("");
+[void]$stringBuilder.AppendLine("View logs
");
+[void]$stringBuilder.AppendLine("
");
+[void]$stringBuilder.AppendLine("");
+
+foreach ($item in $trxObject.Results)
+{
+ $baseClassName = $trxObject.TestDefinitions | Where-Object { $_.id -eq $item.id }
+ $failedClassName = "" + $baseClassName.className + "." + $item.name + "
"
+ $stackTraceText = $item.errorStackTrace
+ [void]$stringBuilder.AppendLine("**``Class: " + $baseClassName.className + "``**");
+
+ [void]$stringBuilder.AppendLine("``````");
+ [void]$stringBuilder.AppendLine("$stackTraceText");
+ [void]$stringBuilder.AppendLine("``````");
+}
+
+[void]$stringBuilder.AppendLine("");
+[void]$stringBuilder.AppendLine("");
+[void]$stringBuilder.AppendLine("");
+
+
$stringBuilder.ToString() | Out-File -FilePath $Destination
From 98a14b29ccb6e9f706ebda201f83b337a9257216 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Sun, 5 Nov 2023 13:49:34 +0000
Subject: [PATCH 44/84] Update
---
.github/workflows/ci.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 89dbb129caee..472998467d55 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -166,14 +166,14 @@ jobs:
- name: Run interaction tests
run: 'dotnet test $env:AUTOMATED_TESTS_ASSEMBLY_DIR\**\Files.InteractionTests.dll --logger: "trx;LogFileName=$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.trx"'
- - name: TRX to MD
+ - name: Convert TRX to MD
shell: pwsh
run: |
. './scripts/Convert-TrxToMarkdown.ps1' `
-Source "$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.trx" `
-Destination "$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.md"
- - name: Show MD
+ - name: Publish tests result
shell: pwsh
run: |
Get-Content $env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.md
From f4a829331b0c9174e9a3073c8801ac3f2dfe1c54 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Sun, 5 Nov 2023 13:57:13 +0000
Subject: [PATCH 45/84] Update
---
scripts/Convert-TrxToMarkdown.ps1 | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/scripts/Convert-TrxToMarkdown.ps1 b/scripts/Convert-TrxToMarkdown.ps1
index 438f99eb9535..28e871ca8c50 100644
--- a/scripts/Convert-TrxToMarkdown.ps1
+++ b/scripts/Convert-TrxToMarkdown.ps1
@@ -198,13 +198,13 @@ foreach ($item in $trxObject.Results)
foreach ($item in $trxObject.Results)
{
$baseClassName = $trxObject.TestDefinitions | Where-Object { $_.id -eq $item.id }
- $failedClassName = "" + $baseClassName.className + "." + $item.name + "
"
- $stackTraceText = $item.errorStackTrace
- [void]$stringBuilder.AppendLine("**``Class: " + $baseClassName.className + "``**");
+ $failedClassName = $baseClassName.className + "." + $item.name
+ [void]$stringBuilder.AppendLine("- **" + $failedClassName + "**");
- [void]$stringBuilder.AppendLine("``````");
- [void]$stringBuilder.AppendLine("$stackTraceText");
- [void]$stringBuilder.AppendLine("``````");
+ $stackTraceText = $item.errorStackTrace
+ [void]$stringBuilder.AppendLine(" ``````");
+ [void]$stringBuilder.Append("$stackTraceText");
+ [void]$stringBuilder.AppendLine(" ``````");
}
[void]$stringBuilder.AppendLine("");
From 962c15f03b1535a331c2224ddb9304cb7cb04d0d Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Sun, 5 Nov 2023 23:24:40 +0900
Subject: [PATCH 46/84] Update ci.yml
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 472998467d55..d980a6543cd8 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -164,7 +164,7 @@ jobs:
# Waiting the tests running to finish.
- name: Run interaction tests
- run: 'dotnet test $env:AUTOMATED_TESTS_ASSEMBLY_DIR\**\Files.InteractionTests.dll --logger: "trx;LogFileName=$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.trx"'
+ run: 'dotnet test $env:AUTOMATED_TESTS_ASSEMBLY_DIR\**\Files.InteractionTests.dll --logger "trx;LogFileName=$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.trx"'
- name: Convert TRX to MD
shell: pwsh
From fe741858b50da7e08e198d400776d29eaed14efa Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Mon, 6 Nov 2023 13:10:09 +0900
Subject: [PATCH 47/84] Update ci.yml
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d980a6543cd8..b49138d14ca7 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -113,7 +113,7 @@ jobs:
name: Copy tests dll to the artifacts dir
shell: pwsh
run: |
- Copy-Item $env:AUTOMATED_TESTS_PROJECT_DIR\bin\**\Files.InteractionTests.dll $env:AUTOMATED_TESTS_ASSEMBLY_DIR
+ Copy-Item $env:AUTOMATED_TESTS_PROJECT_DIR\bin\ $env:AUTOMATED_TESTS_ASSEMBLY_DIR
- if: env.ARCHITECTURE == env.AUTOMATED_TESTS_ARCHITECTURE && env.CONFIGURATION == env.AUTOMATED_TESTS_CONFIGURATION
name: Upload the packages to the Artifacts
From 2134186042ab983ec9368c7424bc10ea56307d6b Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Mon, 6 Nov 2023 07:46:46 +0000
Subject: [PATCH 48/84] Update
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b49138d14ca7..60839be9af94 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -113,7 +113,7 @@ jobs:
name: Copy tests dll to the artifacts dir
shell: pwsh
run: |
- Copy-Item $env:AUTOMATED_TESTS_PROJECT_DIR\bin\ $env:AUTOMATED_TESTS_ASSEMBLY_DIR
+ Copy-Item -Path "$env:AUTOMATED_TESTS_PROJECT_DIR\bin" -Destination "$env:AUTOMATED_TESTS_ASSEMBLY_DIR" -Recurse
- if: env.ARCHITECTURE == env.AUTOMATED_TESTS_ARCHITECTURE && env.CONFIGURATION == env.AUTOMATED_TESTS_CONFIGURATION
name: Upload the packages to the Artifacts
From 8dc815dbcf47af17a2e63b8a3ef0bd7e8283288a Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Mon, 6 Nov 2023 09:46:13 +0000
Subject: [PATCH 49/84] Update to run WinAppDriver :(
---
.github/workflows/ci.yml | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 60839be9af94..9db1a3986bc0 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -156,23 +156,20 @@ jobs:
- name: Set full HD resolution
run: Set-DisplayResolution -Width 1920 -Height 1080 -Force
- # - name: Prepare tests result
- # uses: marocchino/sticky-pull-request-comment@v2
- # with:
- # header: test-result
- # message: |
- # Waiting the tests running to finish.
+ - name: Start WinAppDriver
+ run: Start-Process -FilePath "C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe"
- name: Run interaction tests
run: 'dotnet test $env:AUTOMATED_TESTS_ASSEMBLY_DIR\**\Files.InteractionTests.dll --logger "trx;LogFileName=$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.trx"'
- - name: Convert TRX to MD
+ - name: Generate markdown from the tests result
shell: pwsh
run: |
. './scripts/Convert-TrxToMarkdown.ps1' `
-Source "$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.trx" `
-Destination "$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.md"
+ # This is a temporaly step for debugging
- name: Publish tests result
shell: pwsh
run: |
From d6782a3007fffe76cac86c5532ad4618c883bc23 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Mon, 6 Nov 2023 09:50:57 +0000
Subject: [PATCH 50/84] Update
---
.github/workflows/ci.yml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9db1a3986bc0..c5b2ad9bd8c3 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -2,8 +2,10 @@
# Licensed under the MIT License. See the LICENSE.
# Abstract:
-# This CI is triggered when a commit was added in the main branch directly or
-# a commit was added in a PR whose base branch is the main branch within this repository.
+# - This CI is executed when a new commit is created on the main branch or
+# on a PR whose base branch is the main branch.
+# - However, the CI will not be executed if files not directly related to
+# source code maintenance are updated.
name: Files CI
From 64acb6db5977b8c823017944da4c6c3f93373884 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Mon, 6 Nov 2023 09:54:08 +0000
Subject: [PATCH 51/84] Update
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c5b2ad9bd8c3..d399001f99b9 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -21,7 +21,7 @@ on:
- 'specs/**'
- '*.md'
-run-name: ${{ github.event_name == 'pull_request' && 'Files CI PR' || 'Files CI Validation' }}
+run-name: ${{ github.event_name == 'pull_request' && "Files CI:: ${{ github.event.pull_request.title }}" || 'Files CI' }}
env:
WORKING_DIR: ${{ github.workspace }} # Default: 'D:\a\Files\Files'
From 28f1595a820ab45068201927b789fdd70e5e78ab Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Mon, 6 Nov 2023 09:56:45 +0000
Subject: [PATCH 52/84] Update
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d399001f99b9..2718fc563e20 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -21,7 +21,7 @@ on:
- 'specs/**'
- '*.md'
-run-name: ${{ github.event_name == 'pull_request' && "Files CI:: ${{ github.event.pull_request.title }}" || 'Files CI' }}
+run-name: ${{ github.event_name == 'pull_request' && 'Files CI":" ${{ github.event.pull_request.title }}' || 'Files CI' }}
env:
WORKING_DIR: ${{ github.workspace }} # Default: 'D:\a\Files\Files'
From 7182f9539b0e176765b5f0838fb4c27a5443ebad Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Mon, 6 Nov 2023 09:57:25 +0000
Subject: [PATCH 53/84] Fix
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2718fc563e20..14226c3be314 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -21,7 +21,7 @@ on:
- 'specs/**'
- '*.md'
-run-name: ${{ github.event_name == 'pull_request' && 'Files CI":" ${{ github.event.pull_request.title }}' || 'Files CI' }}
+run-name: ${{ github.event_name == 'pull_request' && 'Files PR Validation || 'Files CI Validation' }}
env:
WORKING_DIR: ${{ github.workspace }} # Default: 'D:\a\Files\Files'
From 0b892627384150eab366b6d7a6940d8706157f98 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Mon, 6 Nov 2023 09:58:08 +0000
Subject: [PATCH 54/84] Fix
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 14226c3be314..fb86b7c78077 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -21,7 +21,7 @@ on:
- 'specs/**'
- '*.md'
-run-name: ${{ github.event_name == 'pull_request' && 'Files PR Validation || 'Files CI Validation' }}
+run-name: ${{ github.event_name == 'pull_request' && 'Files PR Validation' || 'Files CI Validation' }}
env:
WORKING_DIR: ${{ github.workspace }} # Default: 'D:\a\Files\Files'
From 468c647fc888e199708144a7e9966da291d75f31 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Mon, 6 Nov 2023 10:25:46 +0000
Subject: [PATCH 55/84] Update
---
scripts/Convert-TrxToMarkdown.ps1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/Convert-TrxToMarkdown.ps1 b/scripts/Convert-TrxToMarkdown.ps1
index 28e871ca8c50..56a7e2a1f912 100644
--- a/scripts/Convert-TrxToMarkdown.ps1
+++ b/scripts/Convert-TrxToMarkdown.ps1
@@ -96,7 +96,7 @@ foreach ($item in $xmlDoc.TestRun.Results.UnitTestResult)
$stringBuilder = New-Object System.Text.StringBuilder
$title = "## Tested with Files "
-$pullRequestId = ${{ github.event.pull_request.number }}
+$pullRequestId = $env:github.event.pull_request.number
$AbbreviatedOid = $GITHUB_SHA.Substring(0, 7)
$resultOverview = ""
From a2968503e744cf36b89266c24ebea81f899bf7e5 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Mon, 6 Nov 2023 10:44:22 +0000
Subject: [PATCH 56/84] Update
---
.github/workflows/ci.yml | 2 +-
scripts/Convert-TrxToMarkdown.ps1 | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index fb86b7c78077..a08fa3e5cca8 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -3,7 +3,7 @@
# Abstract:
# - This CI is executed when a new commit is created on the main branch or
-# on a PR whose base branch is the main branch.
+# on a PR whose head branch is the main branch.
# - However, the CI will not be executed if files not directly related to
# source code maintenance are updated.
diff --git a/scripts/Convert-TrxToMarkdown.ps1 b/scripts/Convert-TrxToMarkdown.ps1
index 56a7e2a1f912..4c49d1a54324 100644
--- a/scripts/Convert-TrxToMarkdown.ps1
+++ b/scripts/Convert-TrxToMarkdown.ps1
@@ -97,7 +97,8 @@ $stringBuilder = New-Object System.Text.StringBuilder
$title = "## Tested with Files "
$pullRequestId = $env:github.event.pull_request.number
-$AbbreviatedOid = $GITHUB_SHA.Substring(0, 7)
+$AbbreviatedOid = $env:GITHUB_SHA
+$AbbreviatedOid = $AbbreviatedOid.Substring(0, 7)
$resultOverview = ""
# Header
From 384624f721c8d8bf2400528ff6de6261ad35aeb1 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Mon, 6 Nov 2023 22:50:08 +0900
Subject: [PATCH 57/84] Update Convert-TrxToMarkdown.ps1
---
scripts/Convert-TrxToMarkdown.ps1 | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/scripts/Convert-TrxToMarkdown.ps1 b/scripts/Convert-TrxToMarkdown.ps1
index 4c49d1a54324..c4e9504042d0 100644
--- a/scripts/Convert-TrxToMarkdown.ps1
+++ b/scripts/Convert-TrxToMarkdown.ps1
@@ -96,7 +96,6 @@ foreach ($item in $xmlDoc.TestRun.Results.UnitTestResult)
$stringBuilder = New-Object System.Text.StringBuilder
$title = "## Tested with Files "
-$pullRequestId = $env:github.event.pull_request.number
$AbbreviatedOid = $env:GITHUB_SHA
$AbbreviatedOid = $AbbreviatedOid.Substring(0, 7)
$resultOverview = ""
@@ -134,7 +133,7 @@ else
[void]$stringBuilder.AppendLine("");
[void]$stringBuilder.AppendLine("");
[void]$stringBuilder.AppendLine("Commit: ");
-[void]$stringBuilder.AppendLine("$AbbreviatedOid
");
+[void]$stringBuilder.AppendLine("$AbbreviatedOid
");
[void]$stringBuilder.AppendLine(" ");
[void]$stringBuilder.AppendLine("");
[void]$stringBuilder.AppendLine("Status: ");
@@ -142,7 +141,7 @@ else
[void]$stringBuilder.AppendLine(" ");
[void]$stringBuilder.AppendLine("");
[void]$stringBuilder.AppendLine("Full log: ");
-[void]$stringBuilder.AppendLine("https://github.com/files-community/Files/actions/runs/$GITHUB_RUN_ID/job/$GITHUB_JOB ");
+[void]$stringBuilder.AppendLine("https://github.com/files-community/Files/actions/runs/$GITHUB_RUN_ID/job/$GITHUB_JOB ");
[void]$stringBuilder.AppendLine(" ");
[void]$stringBuilder.AppendLine("
");
[void]$stringBuilder.AppendLine("");
From f92cccb0dc074fa6ada998f0c62a5efe45e667ee Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Mon, 6 Nov 2023 22:50:54 +0900
Subject: [PATCH 58/84] Update ci.yml
---
.github/workflows/ci.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a08fa3e5cca8..39c5c2a7c34e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -170,6 +170,8 @@ jobs:
. './scripts/Convert-TrxToMarkdown.ps1' `
-Source "$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.trx" `
-Destination "$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.md"
+ env:
+ PULL_REQUEST_ID: ${{ github.event.pull_request_id }}
# This is a temporaly step for debugging
- name: Publish tests result
From 822fd936997923dfbb331afe3774c9f9e6601451 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Mon, 6 Nov 2023 14:33:29 +0000
Subject: [PATCH 59/84] Update
---
.github/workflows/ci.yml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a08fa3e5cca8..4949b3eb6b1a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -134,6 +134,9 @@ jobs:
platform: [x64]
env:
CONFIGURATION: ${{ matrix.configuration }}
+ permissions:
+ contents: read
+ pull-requests: write
steps:
From 00cb8f0cebb12b1575c0ba21f9824f35ee801d11 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Tue, 7 Nov 2023 07:22:47 +0000
Subject: [PATCH 60/84] Done
---
.github/workflows/ci.yml | 39 +++++++++++++++++++--------------------
1 file changed, 19 insertions(+), 20 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1ba0073aa3c3..58a3613eadf7 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -112,7 +112,7 @@ jobs:
-p:Platform=$env:AUTOMATED_TESTS_ARCHITECTURE
- if: env.ARCHITECTURE == env.AUTOMATED_TESTS_ARCHITECTURE && env.CONFIGURATION == env.AUTOMATED_TESTS_CONFIGURATION
- name: Copy tests dll to the artifacts dir
+ name: Copy tests binaries to the artifacts dir
shell: pwsh
run: |
Copy-Item -Path "$env:AUTOMATED_TESTS_PROJECT_DIR\bin" -Destination "$env:AUTOMATED_TESTS_ASSEMBLY_DIR" -Recurse
@@ -161,29 +161,28 @@ jobs:
- name: Set full HD resolution
run: Set-DisplayResolution -Width 1920 -Height 1080 -Force
- - name: Start WinAppDriver
+ - name: Start WinAppDriver process
run: Start-Process -FilePath "C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe"
- name: Run interaction tests
run: 'dotnet test $env:AUTOMATED_TESTS_ASSEMBLY_DIR\**\Files.InteractionTests.dll --logger "trx;LogFileName=$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.trx"'
- - name: Generate markdown from the tests result
- shell: pwsh
- run: |
- . './scripts/Convert-TrxToMarkdown.ps1' `
- -Source "$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.trx" `
- -Destination "$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.md"
- env:
- PULL_REQUEST_ID: ${{ github.event.pull_request_id }}
-
- # This is a temporaly step for debugging
- - name: Publish tests result
- shell: pwsh
- run: |
- Get-Content $env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.md
+ # - name: Generate markdown from the tests result
+ # shell: pwsh
+ # run: |
+ # . './scripts/Convert-TrxToMarkdown.ps1' `
+ # -Source "$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.trx" `
+ # -Destination "$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.md"
+ # env:
+ # PULL_REQUEST_ID: ${{ github.event.pull_request_id }}
+
+ # - name: Display the markdown on the output (temp)
+ # shell: pwsh
+ # run: |
+ # Get-Content $env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.md
# - name: Publish tests result
- # uses: marocchino/sticky-pull-request-comment@v2
- # with:
- # header: test-result
- # path: '${{ env.AUTOMATED_TESTS_ASSEMBLY_DIR }}\testResults.md'
+ # uses: marocchino/sticky-pull-request-comment@v2
+ # with:
+ # header: test-result
+ # path: '${{ env.AUTOMATED_TESTS_ASSEMBLY_DIR }}\testResults.md'
From 04b0754e3c4a299ae228a6ad1c102cbe6c5701c8 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Tue, 7 Nov 2023 07:39:22 +0000
Subject: [PATCH 61/84] Remove annotations
---
.github/workflows/ci.yml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 58a3613eadf7..1fc1f1fdf9d8 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -124,6 +124,11 @@ jobs:
name: 'Appx Packages (${{ env.CONFIGURATION }}, ${{ env.ARCHITECTURE }})'
path: ${{ env.ARTIFACTS_STAGING_DIR }}
+ - name: Remove annotations
+ run: |
+ echo "::remove-matcher owner=eslint-compact::"
+ echo "::remove-matcher owner=eslint-stylish::"
+
test:
needs: [build]
runs-on: windows-latest
From a8bcb2996c8704fef921bde6aed728c4c6d399e2 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Tue, 7 Nov 2023 08:06:40 +0000
Subject: [PATCH 62/84] Supress warnings
---
.github/workflows/ci.yml | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1fc1f1fdf9d8..3d6823e8a576 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -92,6 +92,7 @@ jobs:
msbuild $env:PACKAGE_PROJECT_PATH `
-t:Build `
-t:_GenerateAppxPackage `
+ -clp:ErrorsOnly `
-p:Configuration=$env:CONFIGURATION `
-p:Platform=$env:ARCHITECTURE `
-p:AppxBundlePlatforms=$env:AUTOMATED_TESTS_ARCHITECTURE `
@@ -108,6 +109,7 @@ jobs:
run: |
msbuild $env:AUTOMATED_TESTS_PROJECT_PATH `
-t:Build `
+ -clp:ErrorsOnly `
-p:Configuration=$env:CONFIGURATION `
-p:Platform=$env:AUTOMATED_TESTS_ARCHITECTURE
@@ -124,11 +126,6 @@ jobs:
name: 'Appx Packages (${{ env.CONFIGURATION }}, ${{ env.ARCHITECTURE }})'
path: ${{ env.ARTIFACTS_STAGING_DIR }}
- - name: Remove annotations
- run: |
- echo "::remove-matcher owner=eslint-compact::"
- echo "::remove-matcher owner=eslint-stylish::"
-
test:
needs: [build]
runs-on: windows-latest
From cb35cbd2c621ef3f5a6a287b67f3a0df57fb1ef4 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Tue, 7 Nov 2023 08:28:22 +0000
Subject: [PATCH 63/84] Remove annotations 2
---
.github/workflows/ci.yml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3d6823e8a576..ab9aeb99d62c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -36,6 +36,8 @@ env:
ARTIFACTS_STAGING_DIR: '${{ github.workspace }}\artifacts'
APPX_PACKAGE_DIR: '${{ github.workspace }}\artifacts\AppxPackages'
APPX_SELFSIGNED_CERT_PATH: '${{ github.workspace }}\builds\Files_SelfSigned.pfx'
+ WINAPPDRIVER_EXE86_PATH: 'C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe'
+ WINAPPDRIVER_EXE64_PATH: 'C:\Program Files\Windows Application Driver\WinAppDriver.exe'
jobs:
build:
@@ -82,6 +84,7 @@ jobs:
run: |
msbuild $env:PACKAGE_PROJECT_PATH `
-t:Build `
+ -clp:ErrorsOnly `
-p:Configuration=$env:CONFIGURATION `
-p:Platform=$env:ARCHITECTURE `
-p:AppxBundle=Never
@@ -164,7 +167,8 @@ jobs:
run: Set-DisplayResolution -Width 1920 -Height 1080 -Force
- name: Start WinAppDriver process
- run: Start-Process -FilePath "C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe"
+ shell: pwsh
+ run: Start-Process -FilePath "$env:WINAPPDRIVER_EXE86_PATH"
- name: Run interaction tests
run: 'dotnet test $env:AUTOMATED_TESTS_ASSEMBLY_DIR\**\Files.InteractionTests.dll --logger "trx;LogFileName=$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.trx"'
From 6d627b00f00ebbe2712c7f58096d4c54c532d312 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Tue, 7 Nov 2023 10:27:13 +0000
Subject: [PATCH 64/84] Fix conditional job running
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ab9aeb99d62c..fc0589194a6d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -79,7 +79,7 @@ jobs:
-p:Configuration=$env:CONFIGURATION `
-p:PublishReadyToRun=true
- - if: env.CONFIGURATION != env.AUTOMATED_TESTS_CONFIGURATION && env.ARCHITECTURE != env.AUTOMATED_TESTS_ARCHITECTURE
+ - if: env.CONFIGURATION != env.AUTOMATED_TESTS_CONFIGURATION || env.ARCHITECTURE != env.AUTOMATED_TESTS_ARCHITECTURE
name: Build Files
run: |
msbuild $env:PACKAGE_PROJECT_PATH `
From 87494dc39e81c72d49ca61f3cf75aa168c055a49 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Tue, 7 Nov 2023 13:10:20 +0000
Subject: [PATCH 65/84] Update
---
.github/workflows/ci.yml | 34 +++++++++++++++++++++++++++++++++-
1 file changed, 33 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index fc0589194a6d..931b47549d50 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -7,7 +7,7 @@
# - However, the CI will not be executed if files not directly related to
# source code maintenance are updated.
-name: Files CI
+name: Files CIXamlStyler
on:
push:
@@ -40,6 +40,38 @@ env:
WINAPPDRIVER_EXE64_PATH: 'C:\Program Files\Windows Application Driver\WinAppDriver.exe'
jobs:
+
+ check-formatting:
+ runs-on: windows-latest
+
+ steps:
+ - name: Checkout the repository
+ uses: actions/checkout@v3
+
+ - name: Install XamlStyler console
+ shell: pwsh
+ run: 'dotnet tool install --global .Console'
+
+ - name: Check XAML formatting
+ id: check-step
+ shell: pwsh
+ run: |
+ $changedFiles = (git diff --name-only HEAD~1) -split "\n" | Where-Object {$_ -like "*.xaml"}
+ foreach ($file in $changedFiles)
+ {
+ xstyler -p -l None -f $file
+ if ($LASTEXITCODE -ne 0)
+ {
+ echo "::error file=$file::Format check failed"
+ }
+ }
+ continue-on-error: true
+
+ - if: steps.check-step.outcome == 'failure'
+ name: Post Check XAML formatting
+ shell: pwsh
+ run: exit 1
+
build:
runs-on: windows-latest
strategy:
From 320d6fe753bb450b2501e143ea0beecb6c5b9cd1 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Tue, 7 Nov 2023 13:12:22 +0000
Subject: [PATCH 66/84] Fixed tool name
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 931b47549d50..42b0ba0b1511 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -50,7 +50,7 @@ jobs:
- name: Install XamlStyler console
shell: pwsh
- run: 'dotnet tool install --global .Console'
+ run: 'dotnet tool install --global XamlStyler.Console'
- name: Check XAML formatting
id: check-step
From b675fc85e9b64b2443a79cfb00e714c0e12108dd Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Tue, 7 Nov 2023 13:13:32 +0000
Subject: [PATCH 67/84] Update
---
.github/workflows/ci.yml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 42b0ba0b1511..7cfa1f4727bd 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -48,6 +48,13 @@ jobs:
- name: Checkout the repository
uses: actions/checkout@v3
+ - name: Validate this job
+ shell: pwsh
+ run: |
+ $changedFiles = (git diff --name-only HEAD~1) -split "\n" | Where-Object {$_ -like "*.xaml"}
+ if ($changedFiles.Count == 0)
+ exit 0
+
- name: Install XamlStyler console
shell: pwsh
run: 'dotnet tool install --global XamlStyler.Console'
From a9ed8dc9bd62bd1948234ac72c32f2c9b7a56188 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Tue, 7 Nov 2023 13:14:06 +0000
Subject: [PATCH 68/84] Fix
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7cfa1f4727bd..c5b350e18d26 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -7,7 +7,7 @@
# - However, the CI will not be executed if files not directly related to
# source code maintenance are updated.
-name: Files CIXamlStyler
+name: Files CI
on:
push:
From b8e730c510198ef2c912d5c3f6baa99542e60c29 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Tue, 7 Nov 2023 13:15:39 +0000
Subject: [PATCH 69/84] Update
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c5b350e18d26..0c452230a2a3 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -52,7 +52,7 @@ jobs:
shell: pwsh
run: |
$changedFiles = (git diff --name-only HEAD~1) -split "\n" | Where-Object {$_ -like "*.xaml"}
- if ($changedFiles.Count == 0)
+ if ($changedFiles.Count -eq 0)
exit 0
- name: Install XamlStyler console
From 2405f723c07e76ab3a93f5d98883e0fb6085965c Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Tue, 7 Nov 2023 13:36:34 +0000
Subject: [PATCH 70/84] Fix
---
.github/workflows/ci.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 0c452230a2a3..2202f06a5acf 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -53,7 +53,9 @@ jobs:
run: |
$changedFiles = (git diff --name-only HEAD~1) -split "\n" | Where-Object {$_ -like "*.xaml"}
if ($changedFiles.Count -eq 0)
+ {
exit 0
+ }
- name: Install XamlStyler console
shell: pwsh
From 69f60035000a6b33a1f8598a70efb53c78ff5bfc Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Tue, 7 Nov 2023 13:45:11 +0000
Subject: [PATCH 71/84] Update
---
.github/workflows/ci.yml | 26 ++++++++------------------
1 file changed, 8 insertions(+), 18 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2202f06a5acf..865741a2ad94 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -42,28 +42,19 @@ env:
jobs:
check-formatting:
- runs-on: windows-latest
+ runs-on: ubuntu-latest
+ defaults:
+ run:
+ shell: pwsh
steps:
- - name: Checkout the repository
- uses: actions/checkout@v3
-
- - name: Validate this job
- shell: pwsh
- run: |
- $changedFiles = (git diff --name-only HEAD~1) -split "\n" | Where-Object {$_ -like "*.xaml"}
- if ($changedFiles.Count -eq 0)
- {
- exit 0
- }
-
+ - uses: actions/checko
+
- name: Install XamlStyler console
- shell: pwsh
run: 'dotnet tool install --global XamlStyler.Console'
- name: Check XAML formatting
id: check-step
- shell: pwsh
run: |
$changedFiles = (git diff --name-only HEAD~1) -split "\n" | Where-Object {$_ -like "*.xaml"}
foreach ($file in $changedFiles)
@@ -76,9 +67,8 @@ jobs:
}
continue-on-error: true
- - if: steps.check-step.outcome == 'failure'
- name: Post Check XAML formatting
- shell: pwsh
+ - name: Fail the job
+ if: steps.check-step.outcome == 'failure'
run: exit 1
build:
From 10b0f80d1261875f456feba89e34d649c2b9ed38 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Tue, 7 Nov 2023 13:46:44 +0000
Subject: [PATCH 72/84] Update
---
.github/workflows/ci.yml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 865741a2ad94..2157c1de6c2c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -48,7 +48,9 @@ jobs:
shell: pwsh
steps:
- - uses: actions/checko
+
+ - name: Checkout the repository
+ uses: actions/checkout@v3
- name: Install XamlStyler console
run: 'dotnet tool install --global XamlStyler.Console'
@@ -83,6 +85,7 @@ jobs:
ARCHITECTURE: ${{ matrix.platform }}
steps:
+
- name: Checkout the repository
uses: actions/checkout@v3
From ed3b54ebe81637337e08b266471760405071e567 Mon Sep 17 00:00:00 2001
From: Marcel Wagner
Date: Tue, 7 Nov 2023 22:55:38 +0100
Subject: [PATCH 73/84] Switch to self sign script
---
.github/workflows/ci.yml | 3 +++
builds/Files_SelfSigned.pfx | Bin 2528 -> 0 bytes
builds/GenerateTestPfx.ps1 | 12 ++++++++++++
3 files changed, 15 insertions(+)
delete mode 100644 builds/Files_SelfSigned.pfx
create mode 100644 builds/GenerateTestPfx.ps1
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2157c1de6c2c..f97ab9ac3995 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -113,6 +113,9 @@ jobs:
-p:Configuration=$env:CONFIGURATION `
-p:PublishReadyToRun=true
+ - name: Create self signed certificate
+ run: ./builds/GenerateTestPFX.ps1
+
- if: env.CONFIGURATION != env.AUTOMATED_TESTS_CONFIGURATION || env.ARCHITECTURE != env.AUTOMATED_TESTS_ARCHITECTURE
name: Build Files
run: |
diff --git a/builds/Files_SelfSigned.pfx b/builds/Files_SelfSigned.pfx
deleted file mode 100644
index ad8719910d5b19be2eec5d8611a231500cc05ad7..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 2528
zcmZXUc{tQ-8^?dcFpYf}`>yQAX)tyP8HvblkUg>+${JxtlSxIklM>+&S<~2=Y$Yb*
zC|R>4Lm1glyv+OST3%^vAg3_R2B)-`ulX+T1!#onu|Q
zNFus5@nqU#eIuWH#(8(P6~jftC6@0@W{3BQ?~{=ZvdF}){*pl<^G-Q2=Lmj)!VMr(4vf=yCJlOl
zDv!I;kH(I<0o)Bi!)*kU>kZ3921=!?{_*4&f`}5Pfk?U^UBWpopP_v7e3N9m|3OG_
z2v=#T?%o}4g^0l_e~RvL2<7sgUI3=)HI!jtC%vT29)pT?Ik7uMF|G9;53wIlh*o5g
zn>=B(@j*(N|6_V}$uqs~dCE{zbH|6O9h7tdS8scE+B&SmBu^<
z39*my_kqZl5gw(POwC0kx1-f`pn3db51T6W+J)Ndw(}HW^M$J;hZojv=x)U-e8
zQ899SZ1+xkxrpanP~)?leFZ3dk3Q;tiy^AEIuis?dPT0Eb@lT~SM{OyCJI_~O9N#b
zVo;tk-=|&pR1rb87vr<1EjaT}5{i4nXws4^`R_{LH5{j=Y|1AI+pfu{G+XFo+SQY1
zt9oA1kgz6X06Q)_S%_=hD0^OO7EbAzIr*(Ris`6YLRLZJKQAY)~#;Vz^g^X+Y
zx5^4O9&*q87CID~&{lqZj;49HaW_t5m`|9QT_?e}W4d4adDmgv8IwyDR!4L1`)=77
zm-QK~ODZAn4BA*a9
z>r`_#bSYFmo{HQTyA12QGoA}}zv0bO@nfM6*SrP??_M>A?hQYo-U=&v%`yKjVoSj|
zDJ(8$j765NTUB&!7qDujlJ$RqOjlI1>C!YEG9g-Pzc&L>MYq{o$&FklG7}n=+b_SD
z>1S+BCqHt#U0D;*m7-IlpDmpF`|7Z|${C7B=Jez`1h-eOhpvo>EqT#3p6=L44@rwg
ztU3vvKW%wZ!>3bv#B|OlwGo@8StYpx9d@~*SjCFH
zg?2@lPF7Mpa4eS%$EENRu$!anEICoNL5Z9zbmx{i2gU%dZs}5rlmE+r%=0@P5?AJ=
z)9ZNn&bCsnZm3b~vM$`v?JDpOPDdz?n48J!nfjqZBDnCZasA%!)+Wz4VyL(>zs1eD
z^_0)O0`?r5u61nH)Vk#O}GAtAxQCl?lvEvEop
zxYRTgTzz%_kAb}rt7RiagMn@*X4@vk$;e27sA9=Lfv|afl%W;R9qDowRu^7Dq8*4=Q3{&0bNOz0;rcilhCz8iqf&SydPyW
zyS6MO^SHL6M$;?S-=DmveBh{!!oI%tP8=%8ySEwBx3
zC{1)FV*t13X;$|5$R^@qQU_Xn{>?8X^us*I#m32_KS%kIV<@dy!WcyIQ-9%0pY2;p^QzY+^5&0o&_NdBoEVe!vo8UyVofz+xB6nayZnC
z*3QN#WK79@UGHyD>diHGAd5feG`)6|%0(M^|L7#aL%zG&N%BEHHK
zAazR~((#`@t|`x3-BF=YY%)Qh!E0#iabQ#85Zy+YNJc7tip8%d`#9)fcHHy9KB
z3}j9~kYe**5Q6{G@8_weIh@>Twb^HC$CMqOwz7XUSIaF6h4<)Fhq37IHU%mNLIONa
zJKAwuA5W4jj&=l=Y?<*E>p8)aSV7r#T)ALf!4Eg_xvE(|8zRA``Vowu(S4gG^9FIO
z7fuqjV>05Z;Nuk4nGlRo{h|7Pp7Tv_2OXt{l0?B+S(Le$nM9yS`76A{hQ&>e~q4|7WZ
diff --git a/builds/GenerateTestPfx.ps1 b/builds/GenerateTestPfx.ps1
new file mode 100644
index 000000000000..34e31807e3dc
--- /dev/null
+++ b/builds/GenerateTestPfx.ps1
@@ -0,0 +1,12 @@
+$CertificateFriendlyName = "Files_SelfSigned"
+$Publisher = "CN=Files_Org"
+
+$cert = New-SelfSignedCertificate -Type Custom `
+ -Subject $Publisher `
+ -KeyUsage DigitalSignature `
+ -FriendlyName $CertificateFriendlyName `
+ -CertStoreLocation "Cert:\CurrentUser\My" `
+ -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.3", "2.5.29.19={text}")
+
+$certificateBytes = $cert.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Pkcs12)
+[System.IO.File]::WriteAllBytes("$PSScriptRoot\Files_SelfSigned.pfx", $certificateBytes)
\ No newline at end of file
From a603ea4cac22592a75ea0d996bcb4a410f54b094 Mon Sep 17 00:00:00 2001
From: Marcel Wagner
Date: Tue, 7 Nov 2023 23:15:27 +0100
Subject: [PATCH 74/84] Add additional app identity
---
tests/Files.InteractionTests/SessionManager.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/Files.InteractionTests/SessionManager.cs b/tests/Files.InteractionTests/SessionManager.cs
index 947e946cbbde..3a0373c5f3ce 100644
--- a/tests/Files.InteractionTests/SessionManager.cs
+++ b/tests/Files.InteractionTests/SessionManager.cs
@@ -17,7 +17,8 @@ public class SessionManager
private static string[] FilesAppIDs = new string[]{
"49306atecsolution.FilesUWP_dwm5abbcs5pn0!App",
"FilesDev_ykqwq8d6ps0ag!App",
- "FilesDev_dwm5abbcs5pn0!App"
+ "FilesDev_dwm5abbcs5pn0!App",
+ "FilesDev_9bhem8es8z4gp!App",
};
private static uint appIdIndex = 0;
From 53e441cabb487b37a3b3806f03ee5d187c8f794f Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Wed, 8 Nov 2023 16:54:13 +0900
Subject: [PATCH 75/84] Delete .github/workflows/check-xaml-formatting.yml
---
.github/workflows/check-xaml-formatting.yml | 49 ---------------------
1 file changed, 49 deletions(-)
delete mode 100644 .github/workflows/check-xaml-formatting.yml
diff --git a/.github/workflows/check-xaml-formatting.yml b/.github/workflows/check-xaml-formatting.yml
deleted file mode 100644
index 44b034176ff3..000000000000
--- a/.github/workflows/check-xaml-formatting.yml
+++ /dev/null
@@ -1,49 +0,0 @@
-name: Check XAML Formatting
-on:
- workflow_dispatch:
- push:
- branches:
- - 'main'
- - 'service/**'
- paths:
- - '**.xaml'
- pull_request:
- branches:
- - 'main'
- - 'service/**'
- paths:
- - '**.xaml'
-
-jobs:
- check-formatting:
- runs-on: ubuntu-latest
- defaults:
- run:
- shell: pwsh
- steps:
- - uses: actions/checkout@v3
- with:
- fetch-depth: 2
-
- - name: Install Xaml Styler
- run: |
- dotnet tool install --global XamlStyler.Console
-
- - name: Check Formatting
- id: check-step
- run: |
- $changedFiles = (git diff --name-only HEAD~1) -split "\n" | Where-Object {$_ -like "*.xaml"}
- foreach ($file in $changedFiles)
- {
- xstyler -p -l None -f $file
- if ($LASTEXITCODE -ne 0)
- {
- echo "::error file=$file::Format check failed"
- }
- }
- continue-on-error: true
-
- - name: Fail job if necessary
- if: steps.check-step.outcome == 'failure'
- run: exit 1
-
From 35b26e9df3fe311af979bd3bf62da525bc4c61e8 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Wed, 8 Nov 2023 16:55:00 +0900
Subject: [PATCH 76/84] Update ci.yml
---
.github/workflows/ci.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f97ab9ac3995..9ff219e0c333 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -51,6 +51,8 @@ jobs:
- name: Checkout the repository
uses: actions/checkout@v3
+ with:
+ fetch-depth: 2
- name: Install XamlStyler console
run: 'dotnet tool install --global XamlStyler.Console'
From d5ec8d698e9833797b7c4f281949a647b1ecd356 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Wed, 8 Nov 2023 08:20:24 +0000
Subject: [PATCH 77/84] Update
---
.github/workflows/ci.yml | 4 ++--
builds/GenerateTestPfx.ps1 | 12 ------------
scripts/Convert-TrxToMarkdown.ps1 | 4 ++++
scripts/Generate-SelfCertPfx.ps1 | 28 ++++++++++++++++++++++++++++
4 files changed, 34 insertions(+), 14 deletions(-)
delete mode 100644 builds/GenerateTestPfx.ps1
create mode 100644 scripts/Generate-SelfCertPfx.ps1
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9ff219e0c333..d42f87dd7bab 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -35,7 +35,7 @@ env:
AUTOMATED_TESTS_ASSEMBLY_DIR: '${{ github.workspace }}\artifacts\TestsAssembly'
ARTIFACTS_STAGING_DIR: '${{ github.workspace }}\artifacts'
APPX_PACKAGE_DIR: '${{ github.workspace }}\artifacts\AppxPackages'
- APPX_SELFSIGNED_CERT_PATH: '${{ github.workspace }}\builds\Files_SelfSigned.pfx'
+ APPX_SELFSIGNED_CERT_PATH: '${{ github.workspace }}\.github\temp\FilesApp_SelfSigned.pfx'
WINAPPDRIVER_EXE86_PATH: 'C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe'
WINAPPDRIVER_EXE64_PATH: 'C:\Program Files\Windows Application Driver\WinAppDriver.exe'
@@ -116,7 +116,7 @@ jobs:
-p:PublishReadyToRun=true
- name: Create self signed certificate
- run: ./builds/GenerateTestPFX.ps1
+ run: ./scripts/Generate-SelfCertPfx.ps1 -Destination "$env:APPX_SELFSIGNED_CERT_PATH"
- if: env.CONFIGURATION != env.AUTOMATED_TESTS_CONFIGURATION || env.ARCHITECTURE != env.AUTOMATED_TESTS_ARCHITECTURE
name: Build Files
diff --git a/builds/GenerateTestPfx.ps1 b/builds/GenerateTestPfx.ps1
deleted file mode 100644
index 34e31807e3dc..000000000000
--- a/builds/GenerateTestPfx.ps1
+++ /dev/null
@@ -1,12 +0,0 @@
-$CertificateFriendlyName = "Files_SelfSigned"
-$Publisher = "CN=Files_Org"
-
-$cert = New-SelfSignedCertificate -Type Custom `
- -Subject $Publisher `
- -KeyUsage DigitalSignature `
- -FriendlyName $CertificateFriendlyName `
- -CertStoreLocation "Cert:\CurrentUser\My" `
- -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.3", "2.5.29.19={text}")
-
-$certificateBytes = $cert.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Pkcs12)
-[System.IO.File]::WriteAllBytes("$PSScriptRoot\Files_SelfSigned.pfx", $certificateBytes)
\ No newline at end of file
diff --git a/scripts/Convert-TrxToMarkdown.ps1 b/scripts/Convert-TrxToMarkdown.ps1
index c4e9504042d0..3c21ebf14dde 100644
--- a/scripts/Convert-TrxToMarkdown.ps1
+++ b/scripts/Convert-TrxToMarkdown.ps1
@@ -1,6 +1,10 @@
# Copyright (c) 2023 Files Community
# Licensed under the MIT License. See the LICENSE.
+# Abstract:
+# This script analyzes the trx file that is the result of executing dotnet test and
+# converts it to markdown, which is used for the Files CI.
+
using namespace System.Collections.Generic;
using namespace System.Linq;
diff --git a/scripts/Generate-SelfCertPfx.ps1 b/scripts/Generate-SelfCertPfx.ps1
new file mode 100644
index 000000000000..e7ce69cc80d1
--- /dev/null
+++ b/scripts/Generate-SelfCertPfx.ps1
@@ -0,0 +1,28 @@
+# Copyright (c) 2023 Files Community
+# Licensed under the MIT License. See the LICENSE.
+
+# Abstract:
+# This script generates a self-signed certificate for the temporary packaging as a pfx file.
+
+param(
+ [string]$Destination = ""
+)
+
+$CertFriendlyName = "FilesApp_SelfSigned"
+$CertPublisher = "CN=Files"
+$CertStoreLocation = "Cert:\CurrentUser\My"
+
+# Generate self signed cert
+$cert = New-SelfSignedCertificate `
+ -Type Custom `
+ -Subject $CertPublisher `
+ -KeyUsage DigitalSignature `
+ -FriendlyName $CertFriendlyName `
+ -CertStoreLocation $CertStoreLocation `
+ -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.3", "2.5.29.19={text}")
+
+# Get size of the self signed cert
+$certificateBytes = $cert.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Pkcs12)
+
+# Save the self signed cert as a file
+[System.IO.File]::WriteAllBytes($Destination, $certificateBytes)
\ No newline at end of file
From d2f87ad47fcd0d8e9974bf49772c7502518eb03e Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Wed, 8 Nov 2023 08:26:17 +0000
Subject: [PATCH 78/84] Update
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d42f87dd7bab..d0d537ddca82 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -35,7 +35,7 @@ env:
AUTOMATED_TESTS_ASSEMBLY_DIR: '${{ github.workspace }}\artifacts\TestsAssembly'
ARTIFACTS_STAGING_DIR: '${{ github.workspace }}\artifacts'
APPX_PACKAGE_DIR: '${{ github.workspace }}\artifacts\AppxPackages'
- APPX_SELFSIGNED_CERT_PATH: '${{ github.workspace }}\.github\temp\FilesApp_SelfSigned.pfx'
+ APPX_SELFSIGNED_CERT_PATH: '${{ github.workspace }}\.github\workflows\FilesApp_SelfSigned.pfx'
WINAPPDRIVER_EXE86_PATH: 'C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe'
WINAPPDRIVER_EXE64_PATH: 'C:\Program Files\Windows Application Driver\WinAppDriver.exe'
From 184d1dd6ba9ca01c91adf24fcba6d3bf8106d7bf Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Wed, 8 Nov 2023 08:45:04 +0000
Subject: [PATCH 79/84] Updated
---
.github/workflows/ci.yml | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d0d537ddca82..43bebe0c9a78 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -115,9 +115,6 @@ jobs:
-p:Configuration=$env:CONFIGURATION `
-p:PublishReadyToRun=true
- - name: Create self signed certificate
- run: ./scripts/Generate-SelfCertPfx.ps1 -Destination "$env:APPX_SELFSIGNED_CERT_PATH"
-
- if: env.CONFIGURATION != env.AUTOMATED_TESTS_CONFIGURATION || env.ARCHITECTURE != env.AUTOMATED_TESTS_ARCHITECTURE
name: Build Files
run: |
@@ -127,7 +124,11 @@ jobs:
-p:Configuration=$env:CONFIGURATION `
-p:Platform=$env:ARCHITECTURE `
-p:AppxBundle=Never
-
+
+ - if: env.CONFIGURATION == env.AUTOMATED_TESTS_CONFIGURATION && env.ARCHITECTURE == env.AUTOMATED_TESTS_ARCHITECTURE
+ name: Create self signed cert as a pfx file
+ run: ./scripts/Generate-SelfCertPfx.ps1 -Destination "$env:APPX_SELFSIGNED_CERT_PATH"
+
- if: env.CONFIGURATION == env.AUTOMATED_TESTS_CONFIGURATION && env.ARCHITECTURE == env.AUTOMATED_TESTS_ARCHITECTURE
name: Build & package Files
run: |
From 8a406d2d1a23af467a37e8e7a35cb2b7e1cd2dee Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Wed, 8 Nov 2023 10:16:59 +0000
Subject: [PATCH 80/84] Update
---
.github/workflows/ci.yml | 80 ++++++++++++++++++++++------------------
1 file changed, 44 insertions(+), 36 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 43bebe0c9a78..0245a57b7bf4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -71,7 +71,7 @@ jobs:
}
continue-on-error: true
- - name: Fail the job
+ - name: Fail the job if the XamlStyler found unformatted file(s)
if: steps.check-step.outcome == 'failure'
run: exit 1
@@ -102,28 +102,30 @@ jobs:
with:
dotnet-version: '7.0.x'
- - name: Restore NuGet
- shell: pwsh
- run: 'nuget restore $env:SOLUTION_PATH'
+ # - name: Restore NuGet
+ # shell: pwsh
+ # run: 'nuget restore $env:SOLUTION_PATH'
- name: Restore Files
shell: pwsh
run: |
- msbuild $env:SOLUTION_PATH `
- -t:Restore `
- -p:Platform=$env:ARCHITECTURE `
- -p:Configuration=$env:CONFIGURATION `
- -p:PublishReadyToRun=true
+ dotnet restore `
+ $env:SOLUTION_PATH
+
+ # -p:Platform=$env:ARCHITECTURE `
+ # -p:Configuration=$env:CONFIGURATION `
+ # -p:PublishReadyToRun=true
- if: env.CONFIGURATION != env.AUTOMATED_TESTS_CONFIGURATION || env.ARCHITECTURE != env.AUTOMATED_TESTS_ARCHITECTURE
name: Build Files
run: |
- msbuild $env:PACKAGE_PROJECT_PATH `
- -t:Build `
- -clp:ErrorsOnly `
- -p:Configuration=$env:CONFIGURATION `
- -p:Platform=$env:ARCHITECTURE `
- -p:AppxBundle=Never
+ dotnet msbuild `
+ $env:PACKAGE_PROJECT_PATH `
+ -t:Build `
+ -clp:ErrorsOnly `
+ -p:Configuration=$env:CONFIGURATION `
+ -p:Platform=$env:ARCHITECTURE `
+ -p:AppxBundle=Never
- if: env.CONFIGURATION == env.AUTOMATED_TESTS_CONFIGURATION && env.ARCHITECTURE == env.AUTOMATED_TESTS_ARCHITECTURE
name: Create self signed cert as a pfx file
@@ -132,35 +134,38 @@ jobs:
- if: env.CONFIGURATION == env.AUTOMATED_TESTS_CONFIGURATION && env.ARCHITECTURE == env.AUTOMATED_TESTS_ARCHITECTURE
name: Build & package Files
run: |
- msbuild $env:PACKAGE_PROJECT_PATH `
- -t:Build `
- -t:_GenerateAppxPackage `
- -clp:ErrorsOnly `
- -p:Configuration=$env:CONFIGURATION `
- -p:Platform=$env:ARCHITECTURE `
- -p:AppxBundlePlatforms=$env:AUTOMATED_TESTS_ARCHITECTURE `
- -p:AppxBundle=Always `
- -p:UapAppxPackageBuildMode=SideloadOnly `
- -p:AppxPackageDir=$env:APPX_PACKAGE_DIR `
- -p:AppxPackageSigningEnabled=true `
- -p:PackageCertificateKeyFile=$env:APPX_SELFSIGNED_CERT_PATH `
- -p:PackageCertificatePassword="" `
- -p:PackageCertificateThumbprint=""
+ dotnet msbuild `
+ $env:PACKAGE_PROJECT_PATH `
+ -t:Build `
+ -t:_GenerateAppxPackage `
+ -clp:ErrorsOnly `
+ -p:Configuration=$env:CONFIGURATION `
+ -p:Platform=$env:ARCHITECTURE `
+ -p:AppxBundlePlatforms=$env:AUTOMATED_TESTS_ARCHITECTURE `
+ -p:AppxBundle=Always `
+ -p:UapAppxPackageBuildMode=SideloadOnly `
+ -p:AppxPackageDir=$env:APPX_PACKAGE_DIR `
+ -p:AppxPackageSigningEnabled=true `
+ -p:PackageCertificateKeyFile=$env:APPX_SELFSIGNED_CERT_PATH `
+ -p:PackageCertificatePassword="" `
+ -p:PackageCertificateThumbprint=""
- if: env.ARCHITECTURE == env.AUTOMATED_TESTS_ARCHITECTURE && env.CONFIGURATION == env.AUTOMATED_TESTS_CONFIGURATION
name: Build interaction tests
run: |
msbuild $env:AUTOMATED_TESTS_PROJECT_PATH `
- -t:Build `
- -clp:ErrorsOnly `
- -p:Configuration=$env:CONFIGURATION `
- -p:Platform=$env:AUTOMATED_TESTS_ARCHITECTURE
+ -t:Build `
+ -clp:ErrorsOnly `
+ -p:Configuration=$env:CONFIGURATION `
+ -p:Platform=$env:AUTOMATED_TESTS_ARCHITECTURE
- if: env.ARCHITECTURE == env.AUTOMATED_TESTS_ARCHITECTURE && env.CONFIGURATION == env.AUTOMATED_TESTS_CONFIGURATION
- name: Copy tests binaries to the artifacts dir
+ name: Copy tests bin to the artifacts dir
shell: pwsh
run: |
- Copy-Item -Path "$env:AUTOMATED_TESTS_PROJECT_DIR\bin" -Destination "$env:AUTOMATED_TESTS_ASSEMBLY_DIR" -Recurse
+ Copy-Item `
+ -Path "$env:AUTOMATED_TESTS_PROJECT_DIR\bin" `
+ -Destination "$env:AUTOMATED_TESTS_ASSEMBLY_DIR" -Recurse
- if: env.ARCHITECTURE == env.AUTOMATED_TESTS_ARCHITECTURE && env.CONFIGURATION == env.AUTOMATED_TESTS_CONFIGURATION
name: Upload the packages to the Artifacts
@@ -211,7 +216,10 @@ jobs:
run: Start-Process -FilePath "$env:WINAPPDRIVER_EXE86_PATH"
- name: Run interaction tests
- run: 'dotnet test $env:AUTOMATED_TESTS_ASSEMBLY_DIR\**\Files.InteractionTests.dll --logger "trx;LogFileName=$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.trx"'
+ run: |
+ dotnet test `
+ $env:AUTOMATED_TESTS_ASSEMBLY_DIR\**\Files.InteractionTests.dll `
+ --logger "trx;LogFileName=$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.trx"
# - name: Generate markdown from the tests result
# shell: pwsh
From ad1a7b19296b9f7e3ac63faf20192e6198ad666b Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Wed, 8 Nov 2023 10:21:33 +0000
Subject: [PATCH 81/84] Fix
---
.github/workflows/ci.yml | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 0245a57b7bf4..6d71c68f3d7c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -102,24 +102,23 @@ jobs:
with:
dotnet-version: '7.0.x'
- # - name: Restore NuGet
- # shell: pwsh
- # run: 'nuget restore $env:SOLUTION_PATH'
+ - name: Restore NuGet
+ shell: pwsh
+ run: 'nuget restore $env:SOLUTION_PATH'
- name: Restore Files
shell: pwsh
run: |
- dotnet restore `
- $env:SOLUTION_PATH
-
- # -p:Platform=$env:ARCHITECTURE `
- # -p:Configuration=$env:CONFIGURATION `
- # -p:PublishReadyToRun=true
+ msbuild $env:SOLUTION_PATH `
+ -t:Restore `
+ -p:Platform=$env:ARCHITECTURE `
+ -p:Configuration=$env:CONFIGURATION `
+ -p:PublishReadyToRun=true
- if: env.CONFIGURATION != env.AUTOMATED_TESTS_CONFIGURATION || env.ARCHITECTURE != env.AUTOMATED_TESTS_ARCHITECTURE
name: Build Files
run: |
- dotnet msbuild `
+ msbuild `
$env:PACKAGE_PROJECT_PATH `
-t:Build `
-clp:ErrorsOnly `
@@ -134,7 +133,7 @@ jobs:
- if: env.CONFIGURATION == env.AUTOMATED_TESTS_CONFIGURATION && env.ARCHITECTURE == env.AUTOMATED_TESTS_ARCHITECTURE
name: Build & package Files
run: |
- dotnet msbuild `
+ msbuild `
$env:PACKAGE_PROJECT_PATH `
-t:Build `
-t:_GenerateAppxPackage `
From 3684adf8bb0751a87a6d8a673fedf8b77f8765cd Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Thu, 9 Nov 2023 07:38:42 +0900
Subject: [PATCH 82/84] Update SessionManager.cs
---
tests/Files.InteractionTests/SessionManager.cs | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tests/Files.InteractionTests/SessionManager.cs b/tests/Files.InteractionTests/SessionManager.cs
index 3a0373c5f3ce..8066919387f4 100644
--- a/tests/Files.InteractionTests/SessionManager.cs
+++ b/tests/Files.InteractionTests/SessionManager.cs
@@ -1,4 +1,4 @@
-// Copyright (c) 2023 Files Community
+// Copyright (c) 2023 Files Community
// Licensed under the MIT License. See the LICENSE.
using OpenQA.Selenium.Appium;
@@ -15,8 +15,6 @@ public class SessionManager
{
private const string WindowsApplicationDriverUrl = "http://127.0.0.1:4723";
private static string[] FilesAppIDs = new string[]{
- "49306atecsolution.FilesUWP_dwm5abbcs5pn0!App",
- "FilesDev_ykqwq8d6ps0ag!App",
"FilesDev_dwm5abbcs5pn0!App",
"FilesDev_9bhem8es8z4gp!App",
};
From 14b45b6b63b32f5b659b1f135cae164c8156675b Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Thu, 9 Nov 2023 13:01:46 +0900
Subject: [PATCH 83/84] Update SessionManager.cs
---
tests/Files.InteractionTests/SessionManager.cs | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/Files.InteractionTests/SessionManager.cs b/tests/Files.InteractionTests/SessionManager.cs
index 8066919387f4..cc8f47202ab1 100644
--- a/tests/Files.InteractionTests/SessionManager.cs
+++ b/tests/Files.InteractionTests/SessionManager.cs
@@ -15,6 +15,7 @@ public class SessionManager
{
private const string WindowsApplicationDriverUrl = "http://127.0.0.1:4723";
private static string[] FilesAppIDs = new string[]{
+ "FilesDev_ykqwq8d6ps0ag!App",
"FilesDev_dwm5abbcs5pn0!App",
"FilesDev_9bhem8es8z4gp!App",
};
From 92e632bc2565ce2b06711412825bb970ea2bfd64 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Fri, 10 Nov 2023 13:15:16 +0900
Subject: [PATCH 84/84] Update SessionManager.cs
---
tests/Files.InteractionTests/SessionManager.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/Files.InteractionTests/SessionManager.cs b/tests/Files.InteractionTests/SessionManager.cs
index cc8f47202ab1..6341542eea4f 100644
--- a/tests/Files.InteractionTests/SessionManager.cs
+++ b/tests/Files.InteractionTests/SessionManager.cs
@@ -15,9 +15,9 @@ public class SessionManager
{
private const string WindowsApplicationDriverUrl = "http://127.0.0.1:4723";
private static string[] FilesAppIDs = new string[]{
- "FilesDev_ykqwq8d6ps0ag!App",
- "FilesDev_dwm5abbcs5pn0!App",
- "FilesDev_9bhem8es8z4gp!App",
+ "FilesDev_ykqwq8d6ps0ag!App", // Needed to run on the local end and/or the CI
+ "FilesDev_9bhem8es8z4gp!App", // Needed to run on the local end and/or the CI
+ "FilesDev_dwm5abbcs5pn0!App", // Needed to run on the CI
};
private static uint appIdIndex = 0;