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 26, 2024
1 parent 2d8d8ff commit 26867e4
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,6 @@ runs:
with:
python-version: '3.11'

- name: Install Hyper-V Module (if needed)
if: runner.os == 'Windows'
shell: pwsh
run: |
# Install Hyper-V module if it's not already installed
if (-not (Get-Module -ListAvailable -Name "Hyper-V")) {
Install-WindowsFeature -Name Hyper-V -IncludeAllSubFeature
}
- name: Setup Virtual Drive on MacOS
if: runner.os == 'macOS'
shell: bash
Expand All @@ -71,17 +62,23 @@ runs:
dd if=/dev/zero of=virtual_test_disk.img bs=1M count=4096
virtual_path=$(sudo losetup -f --show virtual_test_disk.img)
echo "TARGET_DRIVE=${virtual_path}" >> $GITHUB_ENV
echo "ETCHER_INCLUDE_VIRTUAL_DRIVES=1" >> $GITHUB_ENV
- name: Setup Virtual Drive on Windows
if: runner.os == 'Windows'
shell: pwsh
run: |
New-VHD -Path virtual_test_disk.vhdx -SizeBytes 4GB
$vhd = Mount-VHD -Path "virtual_test_disk.vhdx" -Passthru
$disk = Get-Disk -Number $vhd.Number
echo "TARGET_DRIVE=$($disk.DeviceId)" >> $env:GITHUB_ENV
echo "ETCHER_INCLUDE_VIRTUAL_DRIVES=1" >> $env:GITHUB_ENV
fsutil file createnew virtual_test_disk.img 4GB
echo SELECT VDISK FILE=virtual_test_disk.img > mount_script.txt
echo ATTACH VDISK >> mount_script.txt
diskpart /s mount_script.txt
echo LIST VOLUME > list_volumes.txt
for /f "tokens=1-3" %%a in ('diskpart /s list_volumes.txt') do (
if "%%c"=="virtual_test_disk.img" (
echo "TARGET_DRIVE=%%a:\\" >> %GITHUB_ENV%
)
)
- name: Test release
shell: bash
Expand Down

0 comments on commit 26867e4

Please sign in to comment.