Skip to content

Example react native test app#594

Merged
Naturalclar merged 7 commits into
react-native-segmented-control:masterfrom
YajanaRao:example-react-native-test-app
Oct 17, 2022
Merged

Example react native test app#594
Naturalclar merged 7 commits into
react-native-segmented-control:masterfrom
YajanaRao:example-react-native-test-app

Conversation

@YajanaRao

Copy link
Copy Markdown
Contributor

Overview

Fixes #583

Updated example project with react native test app. Re used App.js code. 1.4.6 was the version for react native 0.63.
Link to discussion: microsoft/react-native-test-app#1155

Test Plan

Screenshot_1665678907

Screenshot_1665678946

@Naturalclar

Copy link
Copy Markdown
Member

Awesome! Will review soon

@Naturalclar Naturalclar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YajanaRao
Thanks for the changes! CI seems to be failing, so could you make the following changes?

  1. run yarn lint --fix to apply fix for lint error
  2. in ci.yml file, under android:, add a step to install and build packages in the example directory after yarn install
    it should look like this:
      - name: Install Dependencies
        run: yarn
      - name: Install Example Dependencies
        run: cd example && yarn
      - name: Build android
        run: cd example && yarn build:android
      - name: Build Android Example App and Library
        run: cd example/android && ./gradlew clean assembleDebug
  1. also in ci.yml file, under ios:, add a step to install and build packages in the example directory after yarn install
      - name: Install Dependencies
        run: yarn
      - name: Install Example
        run: cd example && yarn
      - name: Build ios
        run: cd example && yarn build:ios  
      - name: Pod install
        run: cd example && pod install --project-directory=ios
      - name: Run ios app
        run: cd example && yarn ios

@YajanaRao

Copy link
Copy Markdown
Contributor Author

@Naturalclar I have done the changes you requested. yarn lint --fix Did not do any changes to commit.

@Naturalclar Naturalclar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YajanaRao thanks for the changes!
sorry, there was one more fix that needed to be done.
the default java version in ci is 8, but current android build required java 11, so android job needs to be set up to use java 11.

Could you add actions/setup-java in the ci and make it use java 11?

setup should look something like this:

  android:
    runs-on: ubuntu-18.04
    strategy:
      matrix:
        node-version: [16]
        java-version: [11]        
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node-version }}
      - uses: actions/setup-java@v3
        with:
          distribution: 'zulu'
          java-version: ${{ matrix.java-version }}

@Naturalclar Naturalclar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YajanaRao awesome! thanks again for the fixes. merging this PR

@Naturalclar Naturalclar merged commit d087d26 into react-native-segmented-control:master Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use react-native-test-app for example app

2 participants