Skip to content

Commit

Permalink
patch: passing url e2e ?
Browse files Browse the repository at this point in the history
  • Loading branch information
aethernet committed Apr 27, 2024
1 parent 76b2895 commit 416100a
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,25 @@ runs:
run: |
fsutil file createnew virtual_test_disk.img 4294967296
echo SELECT VDISK FILE=virtual_test_disk.img > diskpart_script.txt
echo ATTACH VDISK >> diskpart_script.txt
echo LIST VOLUME >> diskpart_script.txt
diskpart /s diskpart_script.txt > diskpart_output.txt
# Use DiskPart to attach and list volumes
$diskpartScript = @"
SELECT VDISK FILE=virtual_test_disk.img
ATTACH VDISK
LIST VOLUME
"@
diskpart /s $diskpartScript | Out-File -FilePath diskpart_output.txt -Encoding UTF8
echo LIST VOLUME > list_volumes.txt
for /f "tokens=2,3 delims= " %%a in ('find "virtual_test_disk.img" diskpart_output.txt') do (
set drive_letter=%%a
)
# Extract the volume information from the DiskPart output
$diskpartOutput = Get-Content -Path diskpart_output.txt
$driveLine = $diskpartOutput | Select-String -Pattern "virtual_test_disk.img"
# Extract drive letter
$driveLetter = $null
if ($driveLine) {
$tokens = $driveLine -split "\s+"
$driveLetter = $tokens[2]
}

echo "TARGET_DRIVE=!drive_letter!:\\" >> %GITHUB_ENV%

Expand All @@ -98,6 +108,7 @@ runs:
# tests; note that they required `package` to run before
npm run wdio
# e2e suite requires administrative privileges
if [[ '${{ runner.os }}' == 'Windows' ]]; then
npm run wdio-e2e
else
Expand Down

0 comments on commit 416100a

Please sign in to comment.