Skip to content

chore: set yarn version (#2504) #951

chore: set yarn version (#2504)

chore: set yarn version (#2504) #951

name: Example Android check
on:
pull_request:
paths:
- .github/workflows/android-build-test.yml
- 'android/**'
- 'src/fabric/**'
- 'package.json'
- 'example/android/**'
- 'example/package.json'
- 'fabric-example/android/**'
- 'fabric-example/package.json'
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
working-directory: [example, fabric-example]
fail-fast: false
concurrency:
group: android-${{ matrix.working-directory }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout Git repository
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Get react-native-svg node_modules cache
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-modules-svg-${{ hashFiles('yarn.lock') }}
restore-keys: ${{ runner.os }}-node-modules-svg-
- name: Install react-native-svg node_modules
run: yarn install --frozen-lockfile
- name: Get app node_modules cache
uses: actions/cache@v4
with:
path: ${{ matrix.working-directory }}/node_modules
key: ${{ runner.os }}-node-modules-${{ matrix.working-directory }}-${{ hashFiles(format('{0}/yarn.lock', matrix.working-directory)) }}
restore-keys: ${{ runner.os }}-node-modules-${{ matrix.working-directory }}-
- name: Install app node_modules
working-directory: ${{ matrix.working-directory }}
run: yarn install --frozen-lockfile
- name: Get build cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{matrix.working-directory}}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-${{matrix.working-directory}}-
- name: Build app
working-directory: ${{ matrix.working-directory }}/android
run: ./gradlew assembleDebug --build-cache --console=plain -PreactNativeArchitectures=arm64-v8a