Fix CI issues for both iOS and Android and update the sample app #387
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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Node.js CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
test_main_code: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm install | |
- run: npm test | |
test_android: | |
runs-on: macos-11 | |
strategy: | |
matrix: | |
node-version: [18.x] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm install | |
- run: npm install -g react-native-cli | |
- run: npm i react-native-gradle-plugin | |
- name: Test Integration - Install dependencies | |
working-directory: ./Samples/SimpleMixpanel | |
run: npm install | |
- name: Setup Android | |
uses: reactivecircus/[email protected] | |
with: | |
api-level: 30 | |
profile: Nexus 6 | |
arch: x86_64 | |
working-directory: ./Samples/SimpleMixpanel/android | |
script: ./gradlew | |
- name: Test Android | |
uses: reactivecircus/[email protected] | |
with: | |
api-level: 30 | |
profile: Nexus 6 | |
arch: x86_64 | |
working-directory: ./Samples/SimpleMixpanel | |
script: react-native run-android | |
test_ios: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm install | |
- run: npm install -g react-native-cli | |
- name: Test Integration - Install dependencies | |
working-directory: ./Samples/SimpleMixpanel | |
run: npm install | |
- name: Setup iOS | |
working-directory: ./Samples/SimpleMixpanel/ios | |
run: pod install --repo-update | |
- name: Test iOS | |
working-directory: ./Samples/SimpleMixpanel | |
run: react-native run-ios |