new version 1.0.228 #413
This file contains 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
name: App Tests Generic | |
on: | |
push: | |
paths-ignore: | |
- 'README.md' | |
- '.github/workflows/android.yml' | |
pull_request: | |
paths-ignore: | |
- 'README.md' | |
- '.github/workflows/android.yml' | |
workflow_dispatch: | |
inputs: | |
version: | |
description: dummy | |
default: dummy | |
jobs: | |
android-test_generic: | |
runs-on: macos-latest | |
permissions: | |
contents: write | |
if: ${{ true }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: | | |
11 | |
- name: test java1 | |
run: | | |
type java | |
echo "===========1=========" | |
java -version || exit 0 | |
echo "===========2=========" | |
- name: install cliclick | |
run: brew install cliclick | |
- name: macos-version1 | |
run: sw_vers -productVersion | |
- name: macos-version2 | |
run: system_profiler SPSoftwareDataType | |
- name: android test | |
timeout-minutes: 120 | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 31 | |
profile: Nexus 6 | |
arch: x86_64 | |
ndk: 21.0.6113669 | |
cmake: 3.10.2.4988404 | |
emulator-options: -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
disable-spellchecker: true | |
script: | | |
rm -f /Users/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/android-refimpl-app/app/witness.gradle | |
sed -i -e 's#a.getWindow().addFlags#//a.getWindow().addFlagsXXYY#' /Users/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/android-refimpl-app/app/src/main/java/com/zoffcc/applications/trifa/CallingActivity.java | |
printf 'dependencyVerification {\nverify = [\n]\n}\n' > /Users/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/android-refimpl-app/app/witness.gradle | |
java -version | |
cd android-refimpl-app ; ./gradlew assemble | |
cliclick -m verbose m:12,34 | |
screencapture -T 42 -x -t png /Users/runner/screen01.png & | |
screencapture -T 43 -x -t png /Users/runner/screen02.png & | |
screencapture -T 43 -x -t png /Users/runner/screen03.png & | |
screencapture -T 44 -x -t png /Users/runner/screen04.png & | |
screencapture -T 45 -x -t png /Users/runner/screen05.png & | |
screencapture -T 46 -x -t png /Users/runner/screen06.png & | |
screencapture -T 50 -x -t png /Users/runner/screen07.png & | |
screencapture -T 51 -x -t png /Users/runner/screen08.png & | |
screencapture -T 52 -x -t png /Users/runner/screen09.png & | |
screencapture -T 53 -x -t png /Users/runner/screen10.png & | |
screencapture -T 60 -x -t png /Users/runner/screen11.png & | |
screencapture -T 61 -x -t png /Users/runner/screen12.png & | |
screencapture -T 62 -x -t png /Users/runner/screen13.png & | |
screencapture -T 63 -x -t png /Users/runner/screen14.png & | |
screencapture -T 64 -x -t png /Users/runner/screen15.png & | |
screencapture -T 65 -x -t png /Users/runner/screen16.png & | |
screencapture -T 66 -x -t png /Users/runner/screen17.png & | |
screencapture -T 67 -x -t png /Users/runner/screen18.png & | |
screencapture -T 68 -x -t png /Users/runner/screen19.png & | |
screencapture -T 69 -x -t png /Users/runner/screen20.png & | |
screencapture -T 240 -x -t png /Users/runner/screen98.png & | |
screencapture -T 300 -x -t png /Users/runner/screen99.png & | |
adb logcat -c || echo "NOERR" | |
adb logcat > /Users/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/android-refimpl-app/logcat.txt & | |
echo 'sleep 100' > /Users/runner/a.sh | |
echo 'adb shell "screencap -p /storage/emulated/0/screen0.png"' >> /Users/runner/a.sh | |
echo 'adb pull "/storage/emulated/0/screen0.png" /Users/runner/screen_adb_00.png' >> /Users/runner/a.sh | |
echo 'sleep 40' >> /Users/runner/a.sh | |
echo 'adb shell "screencap -p /storage/emulated/0/screen1.png"' >> /Users/runner/a.sh | |
echo 'adb pull "/storage/emulated/0/screen1.png" /Users/runner/screen_adb_01.png' >> /Users/runner/a.sh | |
echo 'sleep 10' >> /Users/runner/a.sh | |
echo 'adb shell "screencap -p /storage/emulated/0/screen2.png"' >> /Users/runner/a.sh | |
echo 'adb pull "/storage/emulated/0/screen2.png" /Users/runner/screen_adb_02.png' >> /Users/runner/a.sh | |
echo 'sleep 10' >> /Users/runner/a.sh | |
echo 'adb shell "screencap -p /storage/emulated/0/screen3.png"' >> /Users/runner/a.sh | |
echo 'adb pull "/storage/emulated/0/screen3.png" /Users/runner/screen_adb_03.png' >> /Users/runner/a.sh | |
echo 'sleep 10' >> /Users/runner/a.sh | |
echo 'adb shell "screencap -p /storage/emulated/0/screen4.png"' >> /Users/runner/a.sh | |
echo 'adb pull "/storage/emulated/0/screen4.png" /Users/runner/screen_adb_04.png' >> /Users/runner/a.sh | |
cat /Users/runner/a.sh | |
ls -al /Users/runner/a.sh | |
chmod u+rx /Users/runner/a.sh | |
bash /Users/runner/a.sh & | |
cd android-refimpl-app ; ./gradlew app:connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.zoffcc.applications.trifa.StartMainActivityWrapperTest || echo "NOERR" | |
- name: upload screenshots | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macscreen | |
path: | | |
/Users/runner/screen*.png | |
- name: upload logcat output | |
continue-on-error: true | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logcat | |
path: | | |
/Users/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/android-refimpl-app/logcat.txt | |
- name: Rename artifact for nightly upload | |
if: github.event_name == 'push' && github.ref == 'refs/heads/zoff99/dev003' | |
run: | | |
pwd | |
cp -av /Users/runner/screen_adb_02.png screen_shot_android.png | |
- name: Upload to nightly release | |
uses: ncipollo/release-action@v1 | |
if: github.event_name == 'push' && github.ref == 'refs/heads/zoff99/dev003' | |
with: | |
allowUpdates: true | |
tag: nightly | |
omitBodyDuringUpdate: true | |
omitNameDuringUpdate: true | |
prerelease: true | |
replacesArtifacts: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts: "screen_shot_android.png" |