You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: implement caching using github actions cache (#35)
* feat: implement remote cache based on github actions cache
This allows us to use an internal remote cache, which is not "supported" by GitHub though.
* docs: update documentation about the built-in cache
msg: App is ready for review, you can [see it here](https://expo.io/@bycedric/use-expo?release-channel=pr-${{ github.event.number }}).
113
140
```
114
141
142
+
### Test PRs on multiple nodes and systems
115
143
116
-
### Test PRs on Node 10 and 12
144
+
With GitHub Actions, it's reasonably easy to set up a matrix build and test the app on multiple environments.
145
+
These matrixes can help to make sure your app runs smoothly on a broad set of different development machines.
146
+
The action below is only running on pull requests to avoid unnecessary builds.
117
147
118
-
Sometimes you want to double-check if your app builds on multiple node versions.
119
-
Setting this up is just as easy as defining a matrix build for multiple systems.
148
+
> If you don't need automatic authentication, you can omit the `expo-username` and `expo-password` variables.
120
149
121
150
```yml
122
151
name: Expo CI
123
152
on: [pull_request]
124
153
jobs:
125
154
ci:
126
155
name: Continuous Integration
127
-
runs-on: ubuntu-latest
156
+
runs-on: ${{ matrix.os }}
128
157
strategy:
129
158
matrix:
130
-
node: [10, 12]
159
+
os: [ubuntu-latest, macOS-latest, windows-latest]
160
+
node: [10, 12, 13]
131
161
steps:
132
162
- uses: actions/checkout@v1
133
163
- uses: actions/setup-node@v1
@@ -136,12 +166,11 @@ jobs:
136
166
- uses: expo/expo-github-action@v4
137
167
with:
138
168
expo-version: 3.x
139
-
- run: npm ci
140
-
- run: npm test
169
+
- run: yarn install
170
+
- run: yarn test
141
171
- run: expo doctor
142
172
```
143
173
144
-
145
174
### Test and build web every day at 08:00
146
175
147
176
You can also schedule jobs by using the cron syntax.
@@ -165,68 +194,29 @@ jobs:
165
194
- uses: expo/expo-github-action@v4
166
195
with:
167
196
expo-version: 3.x
168
-
- run: npm ci
169
-
- run: npm test
197
+
- run: yarn install
198
+
- run: yarn test
170
199
- run: expo build:web
171
200
```
172
201
202
+
## Things to know
173
203
174
-
### Use Docker for improved performance
175
-
176
-
Unfortunately, GitHub Actions lack a feature to cache files and directories across multiple jobs.
177
-
Because of this, the action has to pull and install the [Expo CLI][link-expo-cli] _on every run_.
178
-
If you want faster runs and don't care about customizing your workflows in detail, you can use [the Expo Docker image][link-docker-expo] to speed things up.
179
-
180
-
> Because Docker uses a predefined environment, you lose the ability to customize the Node versions and system types.
181
-
> For most projects this won't be an issue, but please make sure you understand the tradeoffs.
182
-
> This approach is also a robust way and won't break once we implement the caching feature.
0 commit comments