Skip to content

Commit

Permalink
.github/workflows/emulator: actually pack and test the SuT commit
Browse files Browse the repository at this point in the history
  • Loading branch information
t184256 committed Jun 15, 2024
1 parent 7dc9041 commit e931f1e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/workflows/emulator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ jobs:
- name: Build droidctl
run: nix build 'github:t184256/droidctl' --out-link droidctl

- name: Build zipball, channel tarball and flake to inject
run: |
rm -rf n-o-d
mkdir -p n-o-d/unpacked
git -C . archive --format=tar --prefix n-o-d/ HEAD > n-o-d/archive.tar
tar --strip-components=1 -xf n-o-d/archive.tar -C n-o-d/unpacked
gzip n-o-d/archive.tar
nix run '.#deploy' -- file:///data/local/tmp/n-o-d/archive.tar.gz n-o-d/
- name: Configure AVD cache
uses: actions/cache@v4
id: avd-cache
Expand Down Expand Up @@ -66,6 +75,8 @@ jobs:
api-level: ${{ matrix.api-level }}
arch: x86_64
script: >
adb shell 'rm -rf /data/local/tmp/n-o-d' &&
adb push n-o-d /data/local/tmp/ &&
cd tests/emulator &&
adb shell settings put secure enabled_accessibility_services com.google.android.marvin.talkback/com.google.android.marvin.talkback.TalkBackService &&
nix run 'github:t184256/droidctl' -- run ${{ matrix.way }}.py
Expand Down
3 changes: 2 additions & 1 deletion tests/emulator/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
import time

SERVER = 'https://nix-on-droid.unboiled.info'
# Just use F-Droid through fdroidctl later when F-Droid has x86_64 builds
APK = f'{SERVER}/com.termux.nix_188035-x86_64.apk'
BOOTSTRAP_URL = f'{SERVER}/bootstrap-testing'
BOOTSTRAP_URL = 'file:///data/local/tmp/n-o-d'


def screenshot(d, suffix=''):
Expand Down

0 comments on commit e931f1e

Please sign in to comment.