Skip to content

chore: Enable Android workflow for the demo app #123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/small-guests-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-native-owl": patch
---

chore: Enable Android workflow for the demo app
34 changes: 26 additions & 8 deletions .github/workflows/demo-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,21 @@ on: [pull_request]
jobs:
run-visual-regression-ios:
runs-on: macos-11
if: ${{ false }} # FIXME: Remove before merging

steps:
- uses: actions/setup-node@v3
with:
node-version: 16

- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Get Runner Information
run: /usr/bin/xcodebuild -version

- uses: actions/setup-node@v3
with:
node-version: 16

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand Down Expand Up @@ -76,16 +81,25 @@ jobs:

run-visual-regression-android:
runs-on: macos-11
if: ${{ false }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'

- uses: actions/setup-node@v3
with:
node-version: 16

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand All @@ -105,7 +119,7 @@ jobs:
run: yarn install --frozen-lockfile
working-directory: ./example

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
Expand All @@ -115,13 +129,13 @@ jobs:
${{ runner.os }}-gradle-

- name: SKDs - download required images
run: $ANDROID_HOME/tools/bin/sdkmanager "system-images;android-30;default;x86_64"
run: $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "system-images;android-30;default;x86_64"

- name: SDKs - accept licenses
run: y | $ANDROID_HOME/tools/bin/sdkmanager --licenses
run: y | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses

- name: Emulator - Create
run: $ANDROID_HOME/tools/bin/avdmanager create avd -n Pixel_API_30 --device 'Nexus 5X' --package "system-images;android-30;default;x86_64" --sdcard 512M
run: $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n Pixel_API_30 --device 'Nexus 5X' --package "system-images;android-30;default;x86_64" --sdcard 512M

- name: Emulator - Boot
run: $ANDROID_HOME/emulator/emulator -memory 4096 -avd Pixel_API_30 -wipe-data -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim &
Expand All @@ -137,6 +151,10 @@ jobs:
- name: Run Owl Test
run: yarn owl:test:android
working-directory: ./example

- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3

- name: Store screenshots as artifacts
uses: actions/upload-artifact@v2
Expand Down