This file contains 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: Windows Testing | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test-on-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Cygwin and Expect with Admin Privileges | |
shell: pwsh | |
run: | | |
curl -LO https://cygwin.com/setup-x86_64.exe | |
Start-Process -FilePath ./setup-x86_64.exe -ArgumentList '--quiet-mode --root C:\cygwin64 --local-package-dir C:\cygwin64\packages --site http://mirrors.kernel.org/sourceware/cygwin/ --packages expect' -Verb RunAs -Wait | |
- name: Add Cygwin to PATH | |
run: | | |
echo "C:\cygwin64\bin" >> $env:GITHUB_PATH | |
- name: Verify Expect Installation | |
run: expect -v | |
shell: bash | |
- name: Run create-plugma CLI with Expect | |
run: | | |
expect <<EOF | |
log_user 1 | |
set timeout 20 | |
spawn npx create-plugma | |
set inputs [list "\r" "\r" "TestProject\r"] | |
foreach input $inputs { | |
expect { | |
-re . { send $input; exp_continue } | |
} | |
} | |
expect eof | |
EOF | |
shell: bash | |
- name: Display TestProject Directory Contents | |
run: | | |
echo "Contents of TestProject directory:" | |
ls TestProject | |
shell: bash |