Skip to content

Commit 814cb72

Browse files
authored
chore: migrate Windows test app to react-native-test-app (#524)
1 parent 4ee2399 commit 814cb72

33 files changed

+795
-1161
lines changed

.flowconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ untyped-type-import=warn
6464
nonstrict-import=warn
6565
deprecated-type=warn
6666
unsafe-getters-setters=warn
67-
inexact-spread=warn
6867
unnecessary-invariant=warn
6968
signature-verification-failure=warn
7069
deprecated-utility=error
@@ -79,4 +78,4 @@ untyped-import
7978
untyped-type-import
8079

8180
[version]
82-
^0.113.0
81+
^0.122.0

.github/workflows/ci.yml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
key: ${{ hashFiles('yarn.lock') }}
2323
- name: Install JS dependencies
2424
run: |
25-
yarn --pure-lockfile --non-interactive --cache-folder .cache/yarn
25+
yarn ci
2626
- name: Bundle JS
2727
run: |
2828
yarn bundle:macos
@@ -33,3 +33,36 @@ jobs:
3333
- name: Build and test
3434
run: |
3535
yarn test:e2e:macos
36+
windows:
37+
name: "Windows"
38+
runs-on: windows-latest
39+
steps:
40+
- name: Set up MSBuild
41+
uses: microsoft/[email protected]
42+
- name: Setup VSTest.console.exe
43+
uses: darenm/Setup-VSTest@v1
44+
- name: Set up Node.js
45+
uses: actions/setup-node@v1
46+
with:
47+
node-version: 14
48+
- name: Checkout
49+
uses: actions/checkout@v2
50+
- name: Cache /.cache/yarn
51+
uses: actions/cache@v2
52+
with:
53+
path: .cache/yarn
54+
key: ${{ hashFiles('yarn.lock') }}
55+
- name: Install JS dependencies
56+
run: |
57+
yarn ci
58+
- name: Install Windows test app
59+
run: |
60+
yarn install-windows-test-app -p example/windows
61+
- name: Install NuGet packages
62+
run: |
63+
nuget restore
64+
working-directory: example/windows
65+
- name: Build
66+
run: |
67+
MSBuild -t:Rebuild -p:Configuration=Release -p:Platform=x64 ReactTestApp.sln
68+
working-directory: example/windows

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# OSX
32
#
43
.DS_Store
@@ -34,6 +33,14 @@ android/gradle/
3433
android/gradlew
3534
android/gradlew.bat
3635

36+
# Visual Studio
37+
#
38+
example/windows/.vs
39+
example/windows/ARM
40+
example/windows/packages
41+
example/windows/x64
42+
msbuild.binlog
43+
3744
# node.js
3845
#
3946
node_modules/

example/App.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ const styles = StyleSheet.create({
137137
},
138138
restartButton: {
139139
padding: 6,
140-
fontSize: 16,
141140
borderRadius: 5,
142141
backgroundColor: '#F3F3F3',
143142
alignItems: 'center',

example/examples/MergeItem.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,19 +166,23 @@ export default class Merge extends Component<Props, State> {
166166
const onChangeHandler = (text) => {
167167
isTraitsPart
168168
? this.setState(({traits: currentTraits}) => ({
169+
// $FlowFixMe
169170
traits: {
170171
// $FlowFixMe
171172
...currentTraits,
172173
// $FlowFixMe
173174
[input.stateFragment]: text,
174175
},
175176
}))
176-
: this.setState((state) => ({
177-
// $FlowFixMe
178-
...state,
177+
: this.setState((state) =>
179178
// $FlowFixMe
180-
[input.stateFragment]: text,
181-
}));
179+
({
180+
// $FlowFixMe
181+
...state,
182+
// $FlowFixMe
183+
[input.stateFragment]: text,
184+
}),
185+
);
182186
};
183187

184188
return (

example/windows/.gitignore

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

example/windows/AsyncStorageExample/App.cpp

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

example/windows/AsyncStorageExample/App.h

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

example/windows/AsyncStorageExample/App.idl

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

example/windows/AsyncStorageExample/App.xaml

Lines changed: 0 additions & 10 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)