-
Notifications
You must be signed in to change notification settings - Fork 21
/
bitrise.yml
194 lines (175 loc) · 4.86 KB
/
bitrise.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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
format_version: 1.3.1
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
app:
envs:
- BIN_NAME: workflow-editor
- BIN_ARCH: x86_64
- BIN_ARCH_ARM64: arm64
- BIN_OS_DARWIN: Darwin
- BIN_OS_LINUX: Linux
- BIN_PATH_DARWIN: _bin/$BIN_NAME-$BIN_OS_DARWIN-$BIN_ARCH
- BIN_PATH_DARWIN_ARM64: _bin/$BIN_NAME-$BIN_OS_DARWIN-$BIN_ARCH_ARM64
- BIN_PATH_LINUX: _bin/$BIN_NAME-$BIN_OS_LINUX-$BIN_ARCH
- PORT: "1234"
- DEV_SERVER_PORT: "4567"
- MODE: "CLI"
workflows:
install-client-deps:
title: Install the client dependencies
envs:
- NODE_ENV: "prod"
steps:
title: asdf install nodejs
inputs:
- content: |-
#!/usr/bin/env bash
set -ex
if ! [ -d ~/.asdf ]; then
git clone https://github.com/asdf-vm/asdf.git ~/.asdf
source ~/.asdf/asdf.sh
fi
envman add --key PATH --value $PATH
asdf plugin add nodejs ||:
asdf install nodejs
- script:
title: bundle install & npm ci
deps:
apt_get:
- name: ruby
- name: ruby-dev
- name: build-essential
inputs:
- content: |-
#!/bin/bash
set -ex
gem install -f bundler:2.5.6
bundle install
npm ci
build-client:
title: Build the client
envs:
- NODE_ENV: "prod"
steps:
- script:
title: npm run build
inputs:
- content: |-
#!/bin/bash
set -ex
npm run build
install-api-server-deps:
title: Install the API server dependencies
steps:
- script:
title: asdf install golang
inputs:
- content: |-
#!/usr/bin/env bash
set -ex
if ! [ -d ~/.asdf ]; then
git clone https://github.com/asdf-vm/asdf.git ~/.asdf
source ~/.asdf/asdf.sh
fi
envman add --key PATH --value $PATH
asdf plugin add golang ||:
asdf install golang
- script:
title: go install
inputs:
- content: |-
#!/bin/bash
set -ex
go install golang.org/x/lint/golint@latest
go install github.com/kisielk/[email protected]
go install github.com/GeertJohan/go.rice/rice@latest
asdf reshim golang
build-api-server:
title: Build the Go API server binaries
description: |
Creates Linux and Darwin binaries with embedded assets
steps:
- script:
title: Compile Api server
inputs:
- content: |-
#!/bin/bash
set -ex
./_scripts/compile_api.sh
setup:
before_run:
- install-client-deps
- install-api-server-deps
- build-client
- build-api-server
ci:
title: Run the CI checks
envs:
- NODE_ENV: "prod"
steps:
- bitrise-run@0:
title: Run API server tests
inputs:
- workflow_id: test-api
- bitrise-run@0:
title: Run client unit & E2E tests
inputs:
- workflow_id: test-client
test-api:
title: Run the API server tests
before_run:
- install-api-server-deps
steps:
- script:
title: Go Lint & Vet & Check for unhandled errors
inputs:
- content: |-
#!/bin/bash
set -ex
go vet ./...
golint ./...
errcheck -asserts=true -blank=true ./...
- script:
title: Go Test
inputs:
- content: |-
#!/bin/bash
set -ex
go test ./...
test-client:
title: Run the client unit & E2E tests
envs:
- NODE_ENV: "prod"
before_run:
- install-client-deps
- build-client
- build-api-server
steps:
- script:
title: Run linter
inputs:
- content: |-
npm run lint
- script:
title: Run unit tests
inputs:
- content: |-
npm run test
- script:
title: Run E2E tests
deps:
apt_get:
- name: libasound2
- name: libgbm-dev
- name: libgconf-2-4
- name: libgtk-3-0
- name: libgtk2.0-0
- name: libnss3
- name: libxss1
- name: libxtst6
- name: xauth
- name: xvfb
- name: xdg-utils
inputs:
- content: |-
npm run e2e:ci