ci: fix? #16
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
| # generated by o1, edited by sasa+1 | |
| name: test | |
| on: | |
| - push | |
| jobs: | |
| xdotool: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: | | |
| sudo apt-get update | |
| sudo apt-get install -y xdotool xvfb x11-apps imagemagick chromium | |
| - run: | | |
| Xvfb :99 -screen 0 1024x768x24 & | |
| echo 'DISPLAY=:99' >> "$GITHUB_ENV" | |
| - run: | | |
| chromium & | |
| sleep 5 | |
| xdotool type 'Hello, World!' | |
| xdotool key Return | |
| - run: | | |
| xwd -root -display :99 -silent | convert xwd:- png:/tmp/screenshot.png | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: xdotool-screenshot1 | |
| path: /tmp/screenshot.png | |
| xdotool-with-ime: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: sudo apt-get update | |
| - run: > | |
| sudo apt-get --yes install | |
| xdotool | |
| xvfb | |
| x11-apps | |
| imagemagick | |
| chromium | |
| ibus | |
| ibus-mozc | |
| fonts-noto-cjk | |
| - run: | | |
| Xvfb :99 -screen 0 1024x768x24 & | |
| echo 'DISPLAY=:99' >> "$GITHUB_ENV" | |
| export DISPLAY=:99 | |
| # キーボードレイアウトを日本語に設定 | |
| setxkbmap jp | |
| # ibusを起動 | |
| ibus-daemon -drx | |
| sleep 3 | |
| ibus restart | |
| - name: Configure ibus for mozc | |
| run: | | |
| gsettings set org.freedesktop.ibus.general preload-engines "['mozc-jp']" | |
| # gsettings set org.freedesktop.ibus.general preload-engines "['xkb:jp::jpn','mozc-jp']" | |
| gsettings set org.freedesktop.ibus.general use-system-keyboard-layout true | |
| # ibusエンジンをmozcに設定 | |
| ibus engine mozc-jp | |
| - run: chromium --no-sandbox "https://www.google.com" & | |
| continue-on-error: true | |
| - run: | | |
| # ウィンドウをアクティブ化 | |
| # xdotool search --onlyvisible --class chromium windowactivate | |
| # xdotool search --onlyvisible --class Chromium windowactivate --sync | |
| sleep 5 | |
| # sleep 1 | |
| xdotool key ctrl+l | |
| # 日本語入力モードに切り替え | |
| # xdotool key Hangul | |
| xdotool key Zenkaku_Hankaku | |
| sleep 1 | |
| # 日本語を入力 | |
| # xdotool type "こんにちは、世界" | |
| xdotool key k | |
| xdotool key o | |
| xdotool key n | |
| xdotool key n | |
| xdotool key n | |
| xdotool key i | |
| xdotool key t | |
| xdotool key i | |
| xdotool key h | |
| xdotool key a | |
| xdotool key , | |
| xdotool key s | |
| xdotool key e | |
| xdotool key k | |
| xdotool key a | |
| xdotool key i | |
| xdotool key Return | |
| sleep 1 | |
| # Enterキーを押す | |
| xdotool key Return | |
| sleep 5 | |
| - run: | | |
| xwd -root -display :99 -silent | convert xwd:- png:/tmp/screenshot.png | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: xdotool-screenshot2 | |
| path: /tmp/screenshot.png |