Skip to content

Commit 6c8747b

Browse files
authored
Merge pull request #54 from mixpanel/integration-test
Setup integration test
2 parents 9122586 + 43e8282 commit 6c8747b

File tree

7 files changed

+1760
-2461
lines changed

7 files changed

+1760
-2461
lines changed

.github/workflows/node.js.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,36 @@ on:
1212
jobs:
1313
build:
1414

15-
runs-on: ubuntu-latest
15+
runs-on: macos-latest
1616

1717
strategy:
1818
matrix:
19-
node-version: [10.x, 12.x, 14.x, 15.x]
19+
node-version: [15.x]
2020
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2121

2222
steps:
23-
- uses: actions/checkout@v2
23+
- name: Checkout
24+
uses: actions/checkout@v2
2425
- name: Use Node.js ${{ matrix.node-version }}
2526
uses: actions/setup-node@v2
2627
with:
2728
node-version: ${{ matrix.node-version }}
2829
- run: npm install
29-
- run: npm test
30+
- name: Test Integration - Install dependencies
31+
working-directory: ./MixpanelDemo
32+
run: yarn install
33+
- name: Setup iOS
34+
working-directory: ./MixpanelDemo/ios
35+
run: pod install
36+
- name: Test iOS
37+
working-directory: ./MixpanelDemo
38+
run: yarn ios
39+
- name: Setup Android
40+
uses: reactivecircus/android-emulator-runner@v2
41+
with:
42+
api-level: 21
43+
working-directory: ./MixpanelDemo/android
44+
script: ./gradlew connectedCheck
45+
- name: Test Android
46+
working-directory: ./MixpanelDemo
47+
run: yarn android

MixpanelDemo/App.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React, { Component } from 'react';
22
import Navigation from './Router';
3-
import {MixpanelManager} from './Analytics';
43

54

65
export default class App extends Component {

MixpanelDemo/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
buildscript {
44
ext {
55
buildToolsVersion = "29.0.2"
6-
minSdkVersion = 16
6+
minSdkVersion = 21
77
compileSdkVersion = 29
88
targetSdkVersion = 29
99
}

MixpanelDemo/ios/MixpanelDemo.xcodeproj/project.pbxproj

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -473,22 +473,6 @@
473473
"${PODS_ROOT}/Mixpanel-swift/Sources/TakeoverNotificationViewController~ipad.xib",
474474
"${PODS_ROOT}/Mixpanel-swift/Sources/TakeoverNotificationViewController~iphonelandscape.xib",
475475
"${PODS_ROOT}/Mixpanel-swift/Sources/TakeoverNotificationViewController~iphoneportrait.xib",
476-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf",
477-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Entypo.ttf",
478-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf",
479-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Feather.ttf",
480-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf",
481-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf",
482-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf",
483-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf",
484-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Fontisto.ttf",
485-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Foundation.ttf",
486-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf",
487-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf",
488-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf",
489-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Octicons.ttf",
490-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf",
491-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf",
492476
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
493477
);
494478
name = "[CP] Copy Pods Resources";
@@ -498,22 +482,6 @@
498482
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TakeoverNotificationViewController~ipad.nib",
499483
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TakeoverNotificationViewController~iphonelandscape.nib",
500484
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TakeoverNotificationViewController~iphoneportrait.nib",
501-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AntDesign.ttf",
502-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Entypo.ttf",
503-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EvilIcons.ttf",
504-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Feather.ttf",
505-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome.ttf",
506-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Brands.ttf",
507-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Regular.ttf",
508-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Solid.ttf",
509-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Fontisto.ttf",
510-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Foundation.ttf",
511-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Ionicons.ttf",
512-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialCommunityIcons.ttf",
513-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialIcons.ttf",
514-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Octicons.ttf",
515-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf",
516-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf",
517485
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
518486
);
519487
runOnlyForDeploymentPostprocessing = 0;
@@ -533,22 +501,6 @@
533501
"${PODS_ROOT}/Mixpanel-swift/Sources/TakeoverNotificationViewController~ipad.xib",
534502
"${PODS_ROOT}/Mixpanel-swift/Sources/TakeoverNotificationViewController~iphonelandscape.xib",
535503
"${PODS_ROOT}/Mixpanel-swift/Sources/TakeoverNotificationViewController~iphoneportrait.xib",
536-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf",
537-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Entypo.ttf",
538-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf",
539-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Feather.ttf",
540-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf",
541-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf",
542-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf",
543-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf",
544-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Fontisto.ttf",
545-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Foundation.ttf",
546-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf",
547-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf",
548-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf",
549-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Octicons.ttf",
550-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf",
551-
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf",
552504
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
553505
);
554506
name = "[CP] Copy Pods Resources";
@@ -558,22 +510,6 @@
558510
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TakeoverNotificationViewController~ipad.nib",
559511
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TakeoverNotificationViewController~iphonelandscape.nib",
560512
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TakeoverNotificationViewController~iphoneportrait.nib",
561-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AntDesign.ttf",
562-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Entypo.ttf",
563-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EvilIcons.ttf",
564-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Feather.ttf",
565-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome.ttf",
566-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Brands.ttf",
567-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Regular.ttf",
568-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Solid.ttf",
569-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Fontisto.ttf",
570-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Foundation.ttf",
571-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Ionicons.ttf",
572-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialCommunityIcons.ttf",
573-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialIcons.ttf",
574-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Octicons.ttf",
575-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf",
576-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf",
577513
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
578514
);
579515
runOnlyForDeploymentPostprocessing = 0;

MixpanelDemo/package.json

Lines changed: 13 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -10,51 +10,30 @@
1010
"lint": "eslint ."
1111
},
1212
"dependencies": {
13-
"@react-native-community/masked-view": "^0.1.10",
14-
"@react-navigation/native": "^5.8.6",
15-
"@react-navigation/stack": "^5.12.3",
1613
"mixpanel-react-native": "file:..",
17-
"react": "16.13.1",
18-
"react-native": "^0.63.3",
19-
"react-native-elements": "^3.0.0-alpha.1",
14+
"react": "17.0.1",
15+
"react-native": "0.64.0",
16+
"react-navigation": "^4.4.4",
2017
"react-native-gesture-handler": "^1.8.0",
2118
"react-native-interactable": "^2.0.1",
2219
"react-native-ionicons": "^4.6.5",
2320
"react-native-reanimated": "^1.13.1",
21+
"react-native-screens": "^2.13.0",
2422
"react-native-safe-area-context": "^3.1.8",
2523
"react-native-safe-area-view": "react-native-community/react-native-safe-area-view",
26-
"react-native-screens": "^2.13.0",
27-
"react-native-simple-login": "^1.1.0",
28-
"react-native-snap-carousel": "^3.9.1",
29-
"react-native-vector-icons": "^7.1.0",
30-
"react-navigation": "^4.4.3",
31-
"react-navigation-stack": "^2.10.1",
32-
"react-navigation-tabs": "^2.10.1"
24+
"react-navigation-stack": "^2.10.1"
3325
},
3426
"devDependencies": {
35-
"@babel/core": "^7.12.3",
36-
"@babel/runtime": "^7.12.1",
27+
"@babel/core": "^7.12.9",
28+
"@babel/runtime": "^7.12.5",
3729
"@react-native-community/eslint-config": "^2.0.0",
38-
"babel-jest": "^26.6.0",
39-
"eslint": "^7.11.0",
40-
"jest": "^26.6.0",
41-
"metro-react-native-babel-preset": "^0.63.0",
42-
"react-test-renderer": "16.13.1"
30+
"babel-jest": "^26.6.3",
31+
"eslint": "7.14.0",
32+
"jest": "^26.6.3",
33+
"metro-react-native-babel-preset": "^0.64.0",
34+
"react-test-renderer": "17.0.1"
4335
},
4436
"jest": {
45-
"preset": "react-native",
46-
"testMatch": [
47-
"<rootDir>/__tests__/**/*.js?(x)"
48-
],
49-
"verbose": true,
50-
"setupFiles": [
51-
"./node_modules/react-native-gesture-handler/jestSetup.js"
52-
],
53-
"transformIgnorePatterns": [
54-
"node_modules/(?!(...|...|...))"
55-
],
56-
"moduleDirectories": [
57-
"node_modules"
58-
]
37+
"preset": "react-native"
5938
}
6039
}

0 commit comments

Comments
 (0)