Skip to content

Avoid CORS errors

Avoid CORS errors #402

Workflow file for this run

# 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 }}
- uses: actions/setup-java@v4
with:
distribution: "temurin" # See 'Supported distributions' for available options
java-version: "17"
- 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: yarn install
- name: Setup Android
uses: reactivecircus/android-emulator-runner@v2.20.0
with:
api-level: 30
profile: Nexus 6
arch: x86_64
working-directory: ./Samples/SimpleMixpanel/android
script: ./gradlew
- name: Test Android
uses: reactivecircus/android-emulator-runner@v2.20.0
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