This repository has been archived by the owner on Feb 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
/
config.yml
120 lines (110 loc) · 2.56 KB
/
config.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
version: 2.1
executors:
docker-env:
docker:
- image: circleci/node:10.15.2-jessie-browsers-legacy
macos-env:
macos:
xcode: "10.2.0"
step-save-cache: &step-save-cache
save_cache:
paths:
- ~/.cache/yarn
- ~/.cache/electron
- ~/.cache/electron-builder
key: yarn-packages-v2-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
step-restore-cache: &step-restore-cache
restore_cache:
keys:
- yarn-packages-v2-{{ arch }}--{{ .Branch }}-{{ checksum "yarn.lock" }}
- yarn-packages-v2-{{ arch }}
step-yarn-install: &step-yarn-install
run: yarn install --frozen-lockfile
step-build: &step-build
run: yarn build:prod
step-e2e: &step-e2e
run: yarn e2e
filter-tag: &filter-tag
tags:
only: /^v.*/
filter-tag-only: &filter-tag-only
<<: *filter-tag
branches:
ignore: /.*/
jobs:
lint:
executor: docker-env
steps:
- checkout
- run:
name: Setup Environment Variables
command: |
echo 'export ELECTRON_CACHE="$HOME/.cache/electron"' >> $BASH_ENV
echo 'export ELECTRON_BUILDER_CACHE="$HOME/.cache/electron-builder"' >> $BASH_ENV
- *step-restore-cache
- *step-yarn-install
- *step-save-cache
- run: yarn lint
test-linux:
executor: docker-env
steps:
- checkout
- *step-restore-cache
- *step-yarn-install
- run: yarn coverage:ci
- *step-build
- *step-e2e
test-macos:
executor: macos-env
steps:
- checkout
- *step-restore-cache
- *step-yarn-install
- *step-save-cache
- run: yarn test
- *step-build
- *step-e2e
deploy-macos:
executor: macos-env
steps:
- checkout
- *step-restore-cache
- *step-yarn-install
- *step-build
- run: yarn release
deploy-linux:
docker:
- image: electronuserland/builder:wine
steps:
- checkout
- *step-restore-cache
- *step-yarn-install
- *step-build
- run: yarn release --linux --win
workflows:
version: 2
lint-test-build:
jobs:
- lint:
filters:
<<: *filter-tag
- test-linux:
filters:
<<: *filter-tag
requires:
- lint
- test-macos:
filters:
<<: *filter-tag
requires:
- lint
- deploy-linux:
requires:
- test-linux
filters:
<<: *filter-tag-only
- deploy-macos:
requires:
- test-macos
filters:
<<: *filter-tag-only