-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcircle.yml
106 lines (94 loc) · 2.47 KB
/
circle.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
# CircleCI is a piece of shit!
version: 2
jobs:
pr-tests:
working_directory: ~/mandarin
docker:
- image: circleci/node:14.16.0
steps:
- checkout
# Restore npm cache
- restore_cache:
name: Restore Yarn Package Cache
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
# Install dependencies
- run:
name: Install dependencies
command: yarn install --frozen-lockfile
# Run tests
- run:
name: Run tests
command: |
chmod +x ./scripts/create_env.sh
./scripts/create_env.sh
yarn test
# Persist npm cache
- save_cache:
name: Save yarn package cache
key: yarn-packages-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- persist_to_workspace:
root: ~/mandarin
paths: .
publish:
working_directory: ~/mandarin
resource_class: medium+
docker:
- image: circleci/node:14.16.0
steps:
- checkout
# Restore npm cache
- restore_cache:
name: Restore Yarn Package Cache
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
# Install dependencies
- run:
name: Install dependencies
command: yarn install --frozen-lockfile
# Run tests
- run:
name: Run tests
command: |
chmod +x ./scripts/create_env.sh
./scripts/create_env.sh
yarn test
# Persist npm cache
- save_cache:
name: Save yarn package cache
key: yarn-packages-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- persist_to_workspace:
root: ~/mandarin
paths: .
# Install expo-cli and publish an OTA update
- run:
name: Install Expo CLI
command: sudo yarn global add expo-cli
- run:
name: Login to Expo
command: expo login --username $EXPO_USERNAME --password $EXPO_PASSWORD
- run:
name: Publish OTA Update
command: |
export NODE_OPTIONS=--max_old_space_size=4096
yarn run publish
workflows:
version: 2
pr_tests:
jobs:
- pr-tests:
filters:
branches:
ignore:
- master
- production
deploy_update:
jobs:
- publish:
filters:
branches:
only: production