-
Notifications
You must be signed in to change notification settings - Fork 466
139 lines (135 loc) · 4.11 KB
/
default-storage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: Default storage
on:
pull_request:
jobs:
changes:
name: report changed files
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.filter.outputs.storage }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
token: ${{ secrets.GH_RELEASE_TOKEN }}
filters: |
storage:
- 'packages/default-storage/**'
android:
name: Android
needs: changes
if: ${{ needs.changes.outputs.changed == 'true' }}
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup project
uses: ./.github/actions/setup-project
- name: Install JS dependencies
run: |
yarn
- name: Test Next Storage
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper
arguments: react-native-async-storage_async-storage:test
build-root-directory: packages/default-storage/example/android
- name: Build e2e binary
run: |
yarn build:e2e:android
working-directory: packages/default-storage/example
ios:
name: iOS
needs: changes
if: ${{ needs.changes.outputs.changed == 'true' }}
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup project
uses: ./.github/actions/setup-project
- name: Cache /.ccache
uses: actions/cache@v3
with:
path: packages/default-storage/.ccache
key: ccache-ios-${{ hashFiles('yarn.lock') }}
restore-keys: ccache-ios-
- name: Install JS dependencies
run: |
yarn
- name: Bundle JS
run: |
yarn bundle:ios
working-directory: packages/default-storage/example
- name: Install Pods
run: |
RCT_NEW_ARCH_ENABLED=1 pod install
working-directory: packages/default-storage/example/ios
- name: Build e2e binary
run: |
yarn build:e2e:ios
working-directory: packages/default-storage/example
macos:
name: macOS
needs: changes
if: ${{ needs.changes.outputs.changed == 'true' }}
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup project
uses: ./.github/actions/setup-project
- name: Cache /.ccache
uses: actions/cache@v3
with:
path: packages/default-storage/.ccache
key: ccache-macos-${{ hashFiles('yarn.lock') }}
restore-keys: ccache-macos-
- name: Install JS dependencies
run: |
yarn
- name: Bundle JS
run: |
yarn bundle:macos
working-directory: packages/default-storage/example
- name: Install Pods
run: |
RCT_NEW_ARCH_ENABLED=1 pod install
working-directory: packages/default-storage/example/macos
- name: Build
run: |
yarn build:e2e:macos
working-directory: packages/default-storage/example
- name: Test
if: false
run: |
yarn test:e2e:macos
working-directory: packages/default-storage/example
windows:
name: Windows
needs: changes
if: ${{ needs.changes.outputs.changed == 'true' }}
runs-on: windows-2022
steps:
- name: Set up MSBuild
uses: microsoft/setup-msbuild@v1.3
- name: Setup VSTest.console.exe
uses: darenm/Setup-VSTest@v1.2
- name: Checkout
uses: actions/checkout@v4
- name: Setup project
uses: ./.github/actions/setup-project
with:
windows-fix: true
- name: Install JS dependencies
run: |
yarn
- name: Install Windows test app
run: |
yarn install-windows-test-app -p example/windows
working-directory: packages/default-storage
- name: Build
run: |
yarn react-native run-windows --release --arch x64 --logging --no-packager --no-launch --no-deploy --msbuildprops "BundleEntryFile=index.ts,UseBundle=false" --no-telemetry
working-directory: packages/default-storage/example