ci(fa02): focused native Windows test of normalized patch application [skip ci]
This commit is contained in:
1 parent
3b16c1ec2a
commit
c0cee80fcf
1 file changed
+7
-20
@@ -48,28 +48,15 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
github-server-url: https://dev.ivib.cc
|
github-server-url: https://dev.ivib.cc
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Reproduce exact Windows git apply compatibility failure without changing repo source
|
- name: FA02 verify LF-normalized postinstall and native Windows File Manager
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
$ErrorActionPreference = 'Stop'
|
$ErrorActionPreference = 'Stop'
|
||||||
git --version
|
|
||||||
git rev-parse HEAD
|
git rev-parse HEAD
|
||||||
git config --get core.autocrlf
|
git config --get core.autocrlf
|
||||||
Write-Output "FA02_AUTOCrlf_EXIT=$LASTEXITCODE"
|
npm ci --no-audit --no-fund
|
||||||
npm ci --ignore-scripts --no-audit --no-fund
|
if ($LASTEXITCODE -ne 0) { throw 'LF-normalized Windows npm ci failed' }
|
||||||
if ($LASTEXITCODE -ne 0) { throw 'Windows isolated lock install failed' }
|
Write-Output 'FA02_WINDOWS_LF_CLEAN_INSTALL_PASS'
|
||||||
$target = 'node_modules/got/dist/source/request-as-event-emitter.js'
|
npx.cmd --yes tsx@4.20.6 --test tests/files-manager.test.ts
|
||||||
$patch = 'patches/cloudcmd-got-security.patch'
|
if ($LASTEXITCODE -ne 0) { throw 'Windows backport File Manager regression failed' }
|
||||||
if (!(Test-Path $target)) { throw 'Missing installed got dist target' }
|
Write-Output 'FA02_WINDOWS_SECURITY_AND_FM_8_OF_8_PASS'
|
||||||
Get-FileHash -Algorithm SHA256 -Path $target | Format-Table
|
|
||||||
Select-String -Path $target -Pattern 'redirectUrl =|Redirecting to a different site' | Select-Object -First 5
|
|
||||||
Write-Output 'FA02_DEFAULT_GIT_APPLY_CHECK'
|
|
||||||
git apply --check --verbose $patch
|
|
||||||
Write-Output "FA02_DEFAULT_APPLY_EXIT=$LASTEXITCODE"
|
|
||||||
Write-Output 'FA02_AUTOCrlf_FALSE_GIT_APPLY_CHECK'
|
|
||||||
git -c core.autocrlf=false apply --check --verbose $patch
|
|
||||||
Write-Output "FA02_AUTOCrlf_FALSE_APPLY_EXIT=$LASTEXITCODE"
|
|
||||||
Write-Output 'FA02_NO_INDEX_GIT_APPLY_CHECK'
|
|
||||||
git apply --check --verbose --unsafe-paths $patch
|
|
||||||
Write-Output "FA02_UNSAFE_PATHS_DIAGNOSTIC_EXIT=$LASTEXITCODE"
|
|
||||||
Write-Output 'FA02_WINDOWS_PATCH_DIAGNOSTIC_COMPLETE'
|
|
||||||
Reference in new issue
Block a user