Skip to content

Commit

Permalink
chore: try android-emulator-runner action instead
Browse files Browse the repository at this point in the history
  • Loading branch information
spion committed Aug 12, 2024
1 parent 8bdc243 commit 93f67e7
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 28 deletions.
36 changes: 23 additions & 13 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,27 @@ jobs:
test:
needs: build
runs-on: ubuntu-latest
services:
emulator:
image: budtmo/docker-android:emulator_12.0
options: --privileged
steps:
- uses: actions/checkout@v4
- name: prepare
run: sudo apt-get update && sudo apt-get install -y fuse libfuse-dev
- name: get-adbfs-binary
uses: actions/download-artifact@v4
with:
name: adbfs-bin
- name: run-tests
run: sudo bash ./docker/run-docker-test.sh
- uses: actions/checkout@v4
- name: prepare
run: sudo apt-get update && sudo apt-get install -y fuse libfuse-dev
- name: get-adbfs-binary
uses: actions/download-artifact@v4
with:
name: adbfs-bin
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kv
- name: run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
script: ./gradlew connectedCheck
# services:
# emulator:
# image: budtmo/docker-android:emulator_12.0
# options: --privileged
# - name: run-tests
# run: sudo bash ./docker/run-docker-test.sh
26 changes: 11 additions & 15 deletions docker/run-docker-test.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
#!/bin/bash




pushd /root || exit

echo Running supervisord in the background
# echo Running supervisord in the background
# cd /root || exit
HOME=/root /usr/bin/supervisord --configuration supervisord.conf &

popd || exit
# SUPERVISORD_CONFIG_PATH="${APP_PATH}/mixins/configs/process"
# /usr/bin/supervisord --configuration ${SUPERVISORD_CONFIG_PATH}/supervisord-port.conf & \
# /usr/bin/supervisord --configuration ${SUPERVISORD_CONFIG_PATH}/supervisord-base.conf & \

WAIT_TIME=60

Expand Down Expand Up @@ -38,13 +34,13 @@ wait_available() {
echo "Emulator directory $1 was not available for $WAIT_TIME seconds, exiting"
echo "Last output was: $OUTPUT"
echo ""
echo "Logs for docker-appium were (stdout)"
echo ""
cat /var/log/supervisor/docker-android.stdout.log
echo ""
echo "stderr"
echo ""
cat /var/log/supervisor/docker-android.stderr.log
# echo "Logs for docker-appium were (stdout)"
# echo ""
# cat /var/log/supervisor/docker-android.stdout.log
# echo ""
# echo "stderr"
# echo ""
# cat /var/log/supervisor/docker-android.stderr.log
exit 1
fi

Expand Down

0 comments on commit 93f67e7

Please sign in to comment.