forked from bitrise-io/bitrise-workflow-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitrise.yml
191 lines (180 loc) · 4.46 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
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:
up-api:
envs:
- BITRISE_CONFIG: "$TEST_BITRISE_CONFIG_PATH"
- BITRISE_SECRETS: "$TEST_BITRISE_SECRETS_PATH"
- USE_DEV_SERVER: "true"
steps:
inputs:
- path: $GOPATH/src/github.com/bitrise-io/bitrise-workflow-editor
- script:
inputs:
- content: |
#!/bin/bash
set -ex
gin --immediate --appPort=$PORT
setup-client:
steps:
title: install nodejs with asdf
inputs:
- content: |-
#!/usr/bin/env bash
set -ex
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.10.2
source ~/.asdf/asdf.sh
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf install nodejs
envman add --key PATH --value $PATH
- script:
title: Install NPM and Bundler
deps:
apt_get:
- name: ruby
- name: ruby-dev
- name: build-essential
# for cypress
- name: xvfb
- name: libgtk2.0-0
- name: libgtk-3-0
- name: libgconf-2-4
- name: libnss3
- name: libxss1
- name: libasound2
- name: libxtst6
inputs:
- content: |
#!/bin/bash
set -ex
gem install -f bundler:2.1.4
bundle install
npm install
- script:
title: Build client
inputs:
- content: "npm run build"
up:
steps:
- script:
inputs:
- content: |
#!/bin/bash
set -ex
./_scripts/forkpty-run.sh docker-sync-stack start
setup:
steps:
- script:
inputs:
- content: |
#!/bin/bash
set -ex
docker-sync clean
docker-sync start
docker-sync stop
docker-compose kill
docker-compose rm -f -v
docker-compose build
ci:
envs:
- NODE_ENV: "prod"
before_run:
- _install_test_tools
- test-api
- test-client
_install_test_tools:
steps:
- script:
title: Install required testing tools
inputs:
- content: |-
#!/bin/bash
set -ex
# Check for unhandled errors
go install github.com/kisielk/errcheck@latest
# Go lint
go install golang.org/x/lint/golint@latest
test-client:
envs:
- NODE_ENV: "prod"
before_run:
- setup-plugin-api
steps:
- script:
title: Unit tests & linting
inputs:
- content: npm run test-ci
- script:
title: E2E tests
inputs:
- content: npm run e2e-ci
test-api:
steps:
- script:
title: Go Test
inputs:
- content: |-
#!/bin/bash
set -ex
go test ./...
- script:
title: Go Vet
inputs:
- content: |-
#!/bin/bash
set -ex
go vet ./...
- script:
title: Err check
inputs:
- content: |-
#!/bin/bash
set -ex
errcheck -asserts=true -blank=true ./...
- script:
title: Go Lint
inputs:
- content: |-
#!/bin/bash
set -ex
# lint
golint ./...
setup-plugin-api:
title: Set up local plugin api
description: |
Set up and build plugin api from clean state
envs:
- NODE_ENV: "prod"
before_run:
- setup-client
steps:
- script:
title: Compile Api
inputs:
- content: ./_scripts/compile_api.sh
create-binaries:
title: Create binaries
description: |
Creates Linux and Darwin binaries with embedded assets
envs:
- NODE_ENV: "prod"
steps:
- script:
title: Compile Api
inputs:
- content: ./_scripts/compile_api.sh