TO-DROP: replace MSYS2 runtime #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: UI Integration Tests | |
on: | |
push: | |
workflow_dispatch: | |
env: | |
AUTOHOTKEY_VERSION: 2.0.19 | |
WT_VERSION: 1.22.11141.0 | |
jobs: | |
test: | |
runs-on: windows-latest | |
steps: | |
- name: replace MSYS2 runtime | |
run: cp c:/msys64/usr/bin/msys-2.0.dll "c:/Program Files/Git/usr/bin/" | |
- uses: actions/cache/restore@v4 | |
id: restore-wt | |
with: | |
key: wt-${{ env.WT_VERSION }} | |
path: ${{ runner.temp }}/wt.zip | |
- name: Download Windows Terminal | |
if: steps.restore-wt.outputs.cache-hit != 'true' | |
shell: bash | |
run: | | |
curl -fLo "$RUNNER_TEMP/wt.zip" \ | |
https://github.com/microsoft/terminal/releases/download/v$WT_VERSION/Microsoft.WindowsTerminal_${WT_VERSION}_x64.zip | |
- uses: actions/cache/save@v4 | |
if: steps.restore-wt.outputs.cache-hit != 'true' | |
with: | |
key: wt-${{ env.WT_VERSION }} | |
path: ${{ runner.temp }}/wt.zip | |
- name: Install Windows Terminal | |
shell: bash | |
working-directory: ${{ runner.temp }} | |
run: | | |
"$WINDIR/system32/tar.exe" -xf "$RUNNER_TEMP/wt.zip" && | |
cygpath -aw terminal-$WT_VERSION >>$GITHUB_PATH | |
- uses: actions/cache/restore@v4 | |
id: restore-ahk | |
with: | |
key: ahk-${{ env.AUTOHOTKEY_VERSION }} | |
path: ${{ runner.temp }}/ahk.zip | |
- name: Download AutoHotKey2 | |
if: steps.restore-ahk.outputs.cache-hit != 'true' | |
shell: bash | |
run: | | |
curl -L -o "$RUNNER_TEMP/ahk.zip" \ | |
https://github.com/AutoHotkey/AutoHotkey/releases/download/v$AUTOHOTKEY_VERSION/AutoHotkey_$AUTOHOTKEY_VERSION.zip | |
- uses: actions/cache/save@v4 | |
if: steps.restore-ahk.outputs.cache-hit != 'true' | |
with: | |
key: ahk-${{ env.AUTOHOTKEY_VERSION }} | |
path: ${{ runner.temp }}/ahk.zip | |
- name: Install AutoHotKey2 | |
shell: bash | |
working-directory: ${{ runner.temp }} | |
run: | | |
mkdir -p ahk && | |
"$WINDIR/system32/tar.exe" -C ahk -xf "$RUNNER_TEMP/ahk.zip" && | |
cygpath -aw "ahk" >>$GITHUB_PATH | |
- uses: actions/setup-node@v4 # the hook uses node for the background process | |
- uses: actions/checkout@v4 | |
- name: Run UI tests | |
id: ui-tests | |
run: | | |
$p = Start-Process -Wait -FilePath C:\a\_temp\ahk\AutoHotKey64.exe -ArgumentList ui-tests\background-hook.ahk, "$PWD\bg-hook" | |
if ($p.ExitCode -ne 0) { exit 1 } | |
- name: Show log | |
if: success() || steps.ui-tests.outcome == 'failure' | |
run: type bg-hook.log |