diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 89aae0a..2cef8af 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -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 \ No newline at end of file + - 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 \ No newline at end of file diff --git a/docker/run-docker-test.sh b/docker/run-docker-test.sh index aa81cb9..84f73dd 100755 --- a/docker/run-docker-test.sh +++ b/docker/run-docker-test.sh @@ -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 @@ -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