Skip to content

Startup Tests

Startup Tests #13

Workflow file for this run

name: Startup Tests
on:
# push:
# paths-ignore:
# - 'README.md'
# schedule:
# - cron: '0 0 * * *'
workflow_dispatch:
inputs:
version:
description: dummy
default: dummy
defaults:
run:
shell: bash
jobs:
macos:
runs-on: macos-11
if: ${{ true }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: install cliclick
run: brew install cliclick
- name: install wget
run: brew install wget
- name: install sendkeys
run: brew install socsieng/tap/sendkeys
- name: macos-version1
run: sw_vers -productVersion
- name: macos-version2
run: system_profiler SPSoftwareDataType
- name: csrutil-status
run: csrutil status || exit 0
- name: notifications_off_01
run: launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist || exit 0
- name: notifications_off_02
run: killall NotificationCenter || exit 0
- name: startup-app
run: |
pwd
ls -al /Users/runner/
_HOME_="/Users/runner/"
cliclick -m verbose m:12,34
screencapture -T 1 -x -t png /Users/runner/screen01.png &
screencapture -T 2 -x -t png /Users/runner/screen02.png &
screencapture -T 3 -x -t png /Users/runner/screen03.png &
screencapture -T 10 -x -t png /Users/runner/screen04.png &
screencapture -T 25 -x -t png /Users/runner/screen05.png &
screencapture -T 50 -x -t png /Users/runner/screen06.png &
screencapture -T 60 -x -t png /Users/runner/screen07.png &
screencapture -T 90 -x -t png /Users/runner/screen09.png &
screencapture -T 110 -x -t png /Users/runner/screen10.png &
screencapture -T 200 -x -t png /Users/runner/screenshot-macos.png &
screencapture -T 230 -x -t png /Users/runner/screen12.png &
screencapture -T 300 -x -t png /Users/runner/screen13.png &
export _HOME_
cd "$_HOME_"
cd "$_SRC_"
mkdir -p /Users/runner/work/
cd /Users/runner/work/
wget "https://github.com/Zoxcore/qTox_enhanced/releases/download/nightly/qTox-nightly.dmg" -O qtox.dmg
hdiutil info
hdiutil attach /Users/runner/work/qtox.dmg
hdiutil info
cd /Volumes/qTox*
pwd
ls -al
echo '360497DA684BCE2A500C1AF9B3A5CE949BBB9F6FB1F91589806FB04CA039E313' | pbcopy
open ./qtox.app
pwd
sleep 20
sendkeys apps
sendkeys -a "qTox" -c "userm<c:enter>"
sleep 5
# osascript -e 'tell application "qTox" to activate'
sleep 10
sendkeys -a "qTox" -c "<c:u:command>"
sleep 5
sendkeys -a "qTox" -c "<c:u:ctrl>"
sleep 1
cliclick -m verbose c:706,608
sleep 60
sleep 90
sleep 120
pwd
ls -al /Users/runner/
cp -v /Users/runner/screenshot-macos.png /Users/runner/work/qTox_enhanced/qTox_enhanced/screenshot-macos.png
- name: upload-screenshots
uses: actions/upload-artifact@v3
with:
name: screenshot-macos
path: |
/Users/runner/screen*.png
- name: Upload to nightly release
uses: ncipollo/release-action@v1
if: github.ref == 'refs/heads/zoxcore/push_notification'
with:
allowUpdates: true
tag: nightly
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "screenshot-macos.png"
linux-ub20:
runs-on: ubuntu-20.04
if: ${{ true }}
permissions:
contents: write
steps:
- name: os version
run: uname -a
- name: install deps
run: |
sudo apt-get update
sudo apt-get install imagemagick
sudo apt-get install xdotool xclip
sudo apt-get install x11-apps x11-utils
sudo apt-get install xvfb
- name: create runscript
run: |
printf '#!/bin/bash\n' > /tmp/a.sh
printf 'xclock -digital -geometry 300x45+100+600 &\n' >> /tmp/a.sh
printf 'xclip -selection c /tmp/g.txt\n' >> /tmp/a.sh
printf '/home/runner/work/qTox_enhanced/qTox_enhanced/squashfs-root/local/bin/qtox &\n' >> /tmp/a.sh
printf 'sleep 3\n' >> /tmp/a.sh
printf 'xdotool key u s e r l Return\n' >> /tmp/a.sh
printf 'sleep 5\n' >> /tmp/a.sh
printf 'xdotool key ctrl+u\n' >> /tmp/a.sh
printf 'xwininfo -id $(xdotool getactivewindow)\n' >> /tmp/a.sh
printf 'xdotool mousemove 512 386 click 1\n' >> /tmp/a.sh
printf 'sleep 120\n' >> /tmp/a.sh
printf 'import -window root /tmp/screenshot-linux.png\n' >> /tmp/a.sh
cat /tmp/a.sh
chmod a+rx /tmp/a.sh
echo '360497DA684BCE2A500C1AF9B3A5CE949BBB9F6FB1F91589806FB04CA039E313' > /tmp/g.txt
ls -al /tmp/g.txt
- name: startup-app
run: |
pwd
wget "https://github.com/Zoxcore/qTox_enhanced/releases/download/nightly/qTox-nightly.x86_64.AppImage" -O qtox.appimage
chmod a+rx qtox.appimage
./qtox.appimage --appimage-extract
pwd # /home/runner/work/qTox_enhanced/qTox_enhanced
xvfb-run --server-args="-screen 0 1024x768x24" --auto-servernum /tmp/a.sh
cp -av /tmp/screenshot-linux.png screenshot-linux.png
- name: upload-screenshots
uses: actions/upload-artifact@v3
with:
name: screenshot-linux
path: /tmp/screenshot-linux.png
- name: Upload to nightly release
uses: ncipollo/release-action@v1
if: github.ref == 'refs/heads/zoxcore/push_notification'
with:
allowUpdates: true
tag: nightly
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "screenshot-linux.png"
windows:
runs-on: windows-latest
if: ${{ true }}
permissions:
contents: write
steps:
- name: Display the path
run: echo %PATH%
shell: cmd
- name: java-version
run: set -x ; "$JAVA_HOME_11_X64/bin/java.exe" -version
shell: bash
- name: install-app
run: |
curl.exe -L --output qtox.zip --url "https://github.com/Zoxcore/qTox_enhanced/releases/download/nightly/qtox-nightly-x86_64-Release.zip"
dir
tar -xf qtox.zip
dir
shell: cmd
- name: startup-app
shell: pwsh
run: |
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
Start-Sleep -Seconds 30
Set-Clipboard -Value "360497DA684BCE2A500C1AF9B3A5CE949BBB9F6FB1F91589806FB04CA039E313"
Start-Process -FilePath "D:\a\qTox_enhanced\qTox_enhanced\qtox.exe" -WorkingDirectory "D:\a\qTox_enhanced\qTox_enhanced" -windowstyle Maximized
Start-Sleep -Seconds 20
[System.Windows.Forms.SendKeys]::SendWait("userw")
[System.Windows.Forms.SendKeys]::SendWait("{ENTER}")
Start-Sleep -Seconds 8
$signature=@'
[DllImport("user32.dll",CharSet=CharSet.Auto,CallingConvention=CallingConvention.StdCall)]
public static extern void mouse_event(long dwFlags, long dx, long dy, long cButtons, long dwExtraInfo);
'@
$SendMouseClick = Add-Type -memberDefinition $signature -name "Win32MouseEventNew" -namespace Win32Functions -passThru
$x = 650
$y = 544
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y)
sleep -Seconds 01
$SendMouseClick::mouse_event(0x00000002, 0, 0, 0, 0);
$SendMouseClick::mouse_event(0x00000004, 0, 0, 0, 0);
Start-Sleep -Seconds 180
- name: capture-screen
shell: pwsh
run: |
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
$Screen = [System.Windows.Forms.SystemInformation]::VirtualScreen
$Width = $Screen.Width
$Height = $Screen.Height
$Left = $Screen.Left
$Top = $Screen.Top
$bitmap = New-Object System.Drawing.Bitmap $Width, $Height
$graphic = [System.Drawing.Graphics]::FromImage($bitmap)
$graphic.CopyFromScreen($Left, $Top, 0, 0, $bitmap.Size)
$bitmap.Save("D:\a\qTox_enhanced\qTox_enhanced\screenshot-windows.png")
Write-Output "Screenshot saved to:"
Write-Output D:\a\qTox_enhanced\qTox_enhanced\screenshot-windows.png
- name: upload-screenshots
uses: actions/upload-artifact@v3
with:
name: screenshot-windows
path: |
D:\a\qTox_enhanced\qTox_enhanced\screenshot-windows.png
- name: Upload to nightly release
uses: ncipollo/release-action@v1
if: github.ref == 'refs/heads/zoxcore/push_notification'
with:
allowUpdates: true
tag: nightly
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "screenshot-windows.png"