Files
android-emulator-runner/.github/workflows/workflow.yml
T
2020-10-30 20:52:34 +11:00

97 lines
2.6 KiB
YAML

name: Main workflow
on:
pull_request:
push:
branches:
# - main
- 'yc/*'
paths-ignore:
- '**.md'
jobs:
test:
# runs-on: ${{ matrix.os }}
runs-on: macos-latest
env:
JAVA_TOOL_OPTIONS: -Xmx4g
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
# os: [macos-latest, ubuntu-latest]
api-level: [23, 24, 25, 26, 27, 28, 29, 30]
# target: [default, google_apis]
# exclude:
# - os: ubuntu-latest
# api-level: 23
# - os: ubuntu-latest
# api-level: 29
# - target: google_apis
# api-level: 16
# - target: google_apis
# api-level: 23
# - target: google_apis
# api-level: 29
# include:
# - os: macos-latest
# api-level: 30
# target: google_apis
# - os: macos-latest
# api-level: 24
# target: playstore
steps:
- name: checkout
uses: actions/checkout@v2
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: build, test and lint
run: |
npm ci
npm run build
npm run lint
npm test
- name: Java 15
uses: actions/setup-java@v1
with:
java-version: 15
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: run action
uses: ./
with:
api-level: ${{ matrix.api-level }}
target: default
arch: x86
# profile: Nexus 6
profile: pixel_3a
# avd-name: test
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none
disable-animations: true
working-directory: ./test-fixture/
script: |
echo $GITHUB_REPOSITORY
adb devices
adb shell ls -la /sdcard
adb shell ls -la /storage
adb emu geo fix 0 51
adb shell screenrecord --verbose /sdcard/capture.mpg &
adb shell pkill -INT screenrecord
mkdir -p app/build/report
cd app/build/report && adb pull /sdcard/capture.mpg
# ./gradlew help
# ./gradlew connectedDebugAndroidTest
- name: Upload build artifacts
uses: actions/upload-artifact@v1
with:
name: build-outputs
path: ./test-fixture/app/build/report