Skip to content

Commit 230df26

Browse files
authored
Use React Native Test App for Example (#97)
1 parent 42763fe commit 230df26

File tree

114 files changed

+10349
-49350
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+10349
-49350
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-18.04
77
strategy:
88
matrix:
9-
node-version: [12]
9+
node-version: [16]
1010
steps:
1111
- uses: actions/checkout@v2
1212
- uses: actions/setup-node@v1
@@ -27,7 +27,7 @@ jobs:
2727
runs-on: ubuntu-18.04
2828
strategy:
2929
matrix:
30-
node-version: [12]
30+
node-version: [16]
3131
steps:
3232
- uses: actions/checkout@v2
3333
- uses: actions/setup-node@v1
@@ -48,7 +48,7 @@ jobs:
4848
runs-on: ubuntu-18.04
4949
strategy:
5050
matrix:
51-
node-version: [12]
51+
node-version: [16]
5252
steps:
5353
- uses: actions/checkout@v2
5454
- uses: actions/setup-node@v1
@@ -69,12 +69,17 @@ jobs:
6969
runs-on: ubuntu-18.04
7070
strategy:
7171
matrix:
72-
node-version: [12]
72+
node-version: [16]
73+
java-version: [11]
7374
steps:
7475
- uses: actions/checkout@v2
7576
- uses: actions/setup-node@v1
7677
with:
7778
node-version: ${{ matrix.node-version }}
79+
- uses: actions/setup-java@v3
80+
with:
81+
distribution: 'zulu' # See 'Supported distributions' for available options
82+
java-version: ${{ matrix.java-version }}
7883
- name: Get yarn cache
7984
id: yarn-cache
8085
run: echo "::set-output name=dir::$(yarn cache dir)"
@@ -84,13 +89,17 @@ jobs:
8489
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
8590
- name: Install Dependencies
8691
run: yarn
92+
- name: Install Example Dependencies
93+
run: cd example && yarn
94+
- name: Build android
95+
run: cd example && yarn build:android
8796
- name: Build Android Example App and Library
8897
run: cd example/android && ./gradlew clean assembleDebug
8998
ios:
9099
runs-on: macos-latest
91100
strategy:
92101
matrix:
93-
node-version: [12]
102+
node-version: [16]
94103
steps:
95104
- uses: actions/checkout@v2
96105
- uses: actions/setup-node@v1
@@ -105,7 +114,11 @@ jobs:
105114
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
106115
- name: Install Dependencies
107116
run: yarn
117+
- name: Install Example Dependencies
118+
run: cd example && yarn
119+
- name: Build ios
120+
run: cd example && yarn build:ios
108121
- name: Install Podfiles
109-
run: cd example && npx pod-install
122+
run: cd example && pod install --project-directory=ios
110123
- name: Build example app
111124
run: yarn ios

.github/workflows/windows-ci.yml

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ jobs:
55
run-windows-tests:
66
name: Build & run tests
77
runs-on: windows-2019
8+
strategy:
9+
matrix:
10+
node-version: [16]
811

912
steps:
1013
- uses: actions/checkout@v2
@@ -13,7 +16,7 @@ jobs:
1316
- name: Setup Node.js
1417
uses: actions/setup-node@v1
1518
with:
16-
node-version: '12.9.1'
19+
node-version: ${{ matrix.node-version }}
1720

1821
- name: Setup MSBuild
1922
uses: microsoft/[email protected]
@@ -33,33 +36,21 @@ jobs:
3336
${{ runner.os }}-yarn-
3437
- name: Install node modules
3538
if: steps.yarn-cache.outputs.cache-hit != 'true'
36-
run:
37-
yarn add [email protected] --dev
38-
yarn --pure-lockfile
39-
40-
- name: yarn build
41-
if: steps.yarn-cache.outputs.cache-hit == 'true'
42-
run: |
43-
yarn build
44-
yarn tsc
45-
46-
- name: NuGet restore
47-
run: nuget restore example\windows\ProgressViewExample.sln
39+
run: yarn --pure-lockfile
40+
41+
- name: Install example node modules
42+
if: steps.yarn-cache.outputs.cache-hit != 'true'
43+
run: cd example && yarn
4844

49-
- name: Build x64 release
50-
run: npx react-native run-windows --root example --arch x64 --release --no-packager --no-deploy --logging
51-
52-
- name: Deploy
53-
shell: powershell
54-
run: |
55-
cd example
56-
Copy-Item -Path windows\x64\Release -Recurse -Destination windows\
57-
npx react-native run-windows --arch x64 --release --no-build --no-packager
45+
- name: Build Windows
46+
run: cd example && yarn build:windows
5847

48+
- name: Generate Windows App
49+
run: cd example && npx install-windows-test-app --use-nuget
50+
51+
# - name: Start Appium server
52+
# shell: powershell
53+
# run: Start-Process PowerShell -ArgumentList "yarn appium"
5954

60-
- name: Start Appium server
61-
shell: powershell
62-
run: Start-Process PowerShell -ArgumentList "yarn appium"
63-
64-
- name: Run tests
65-
run: yarn test:windows
55+
# - name: Run tests
56+
# run: yarn test:windows

example/.buckconfig

Lines changed: 0 additions & 6 deletions
This file was deleted.

example/.flowconfig

Lines changed: 0 additions & 66 deletions
This file was deleted.

example/.gitattributes

Lines changed: 0 additions & 3 deletions
This file was deleted.

example/.gitignore

Lines changed: 10 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,14 @@
1-
# OSX
2-
#
1+
*.binlog
2+
*.hprof
3+
*.xcworkspace/
4+
*.zip
35
.DS_Store
4-
5-
# Xcode
6-
#
6+
.gradle/
7+
.idea/
8+
.vs/
9+
Pods/
710
build/
8-
*.pbxuser
9-
!default.pbxuser
10-
*.mode1v3
11-
!default.mode1v3
12-
*.mode2v3
13-
!default.mode2v3
14-
*.perspectivev3
15-
!default.perspectivev3
16-
xcuserdata
17-
*.xccheckout
18-
*.moved-aside
19-
DerivedData
20-
*.hmap
21-
*.ipa
22-
*.xcuserstate
23-
24-
# Android/IntelliJ
25-
#
26-
build/
27-
.idea
28-
.gradle
11+
dist/
2912
local.properties
30-
*.iml
31-
32-
# node.js
33-
#
13+
msbuild.binlog
3414
node_modules/
35-
npm-debug.log
36-
yarn-error.log
37-
38-
# BUCK
39-
buck-out/
40-
\.buckd/
41-
*.keystore
42-
!debug.keystore
43-
44-
# fastlane
45-
#
46-
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47-
# screenshots whenever they are needed.
48-
# For more information about the recommended setup visit:
49-
# https://docs.fastlane.tools/best-practices/source-control/
50-
51-
*/fastlane/report.xml
52-
*/fastlane/Preview.html
53-
*/fastlane/screenshots
54-
55-
# Bundle artifact
56-
*.jsbundle
57-
58-
# CocoaPods
59-
/ios/Pods/

example/App.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import * as React from 'react';
22
import {StyleSheet, Text, SafeAreaView, Platform} from 'react-native';
3-
import {ProgressView} from '../js';
3+
import {ProgressView} from '@react-native-community/progress-view';
44

55
type Props = {||};
66
type State = {|
77
progress: number,
88
|};
99

10-
export class App extends React.Component<Props, State> {
10+
class App extends React.Component<Props, State> {
1111
_rafId: ?AnimationFrameID = null;
1212

1313
state = {
@@ -118,6 +118,8 @@ export class App extends React.Component<Props, State> {
118118
}
119119
}
120120

121+
export default App;
122+
121123
const styles = StyleSheet.create({
122124
container: {
123125
flex: 1,

example/_editorconfig

Lines changed: 0 additions & 3 deletions
This file was deleted.

example/android/app/_BUCK

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)