forked from firefox-devtools/debugger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle-2.0.yml
143 lines (130 loc) · 4.96 KB
/
circle-2.0.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
version: 2
executorType: docker
containerInfo:
- image: node:7
cmd: ["/bin/bash"]
- image: jasonlaster11/mochitest-runner:latest
env:
- DISPLAY=unix:99
- SHELL=/bin/bash
stages:
build:
workDir: ~/debugger
steps:
- type: checkout
- type: shell
name: Copy Config Files
shell: /bin/bash --login
command: cp configs/ci.json configs/local.json
- type: shell
name: Install System Packages
shell: /bin/bash --login
command: |
apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg
echo "deb http://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
apt-get update -qq
apt-get install -y -qq yarn ocaml libelf-dev
- type: cache-restore
keys:
- debugger-{{ checksum "yarn.lock" }}
# Providing keys in decreasing specificity means it's more likely a new cache can be built from an existing one.
- debugger-
- type: shell
name: Yarn Install
shell: /bin/bash --login
command: yarn
- type: cache-save
key: debugger-{{ checksum "yarn.lock" }}
paths:
- ~/.yarn-cache
- type: shell
name: Yarn Lint
shell: /bin/bash --login
command: |
set -exu
yarn run license-check
yarn run lint-css
yarn run lint-js
yarn run lint-md
- type: shell
name: Flow
shell: /bin/bash --login
command: |
set -exu
yarn run flow
environment:
TERM: dumb
- type: shell
name: Yarn Check yarn.lock
shell: /bin/bash --login
command: |
set -exu
yarn check
# Run tests
- type: shell
name: Node Unit Tests
shell: /bin/bash --login
command: |
set -exu
mkdir -p /tmp/test-results/mocha
node src/test/node-unit-tests.js --ci
environment:
MOCHA_FILE: "/tmp/artifacts/mocha/test-results.xml"
# - type: shell
# name: Install Docker Client
# shell: /bin/bash --login
# command: |
# curl -L -o /tmp/docker.tgz https://get.docker.com/builds/Linux/x86_64/docker-1.12.6.tgz
# tar -xz -C /tmp -f /tmp/docker.tgz
# mv /tmp/docker/docker* /usr/bin/
#
# - type: setup-docker-engine
#
# - type: shell
# name: Test Docker Client
# shell: /bin/bash --login
# command: |
# docker --version
# docker ps
#
# - type: shell
# name: Publish Assets
# shell: /bin/bash --login
# command: |
# node ./bin/publish-assets
# ls -R `pwd`/assets/build
#
# - type: shell
# name: Docker Mochitests
# shell: /bin/bash --login
# command: |
# docker run -it \
# -v `pwd`/assets/build/debugger.js:/firefox/devtools/client/debugger/new/debugger.js \
# -v `pwd`/assets/build/pretty-print-worker.js:/firefox/devtools/client/debugger/new/pretty-print-worker.js \
# -v `pwd`/assets/build/integration-tests.js:/firefox/devtools/client/debugger/new/integration-tests.js \
# -v `pwd`/assets/build/debugger.css:/firefox/devtools/client/debugger/new/debugger.css \
# -v `pwd`/assets/build/panel/debugger.properties:/firefox/devtools/client/locales/en-US/debugger.properties \
# -v `pwd`/assets/build/panel/prefs.js:/firefox/devtools/client/preferences/devtools.js \
# -v `pwd`/assets/build/panel/panel.js:/firefox/devtools/client/debugger/new/panel.js \
# -v `pwd`/assets/build/panel/index.html:/firefox/devtools/client/debugger/new/index.html \
# -v `pwd`/assets/build/panel/moz.build:/firefox/devtools/client/debugger/new/moz.build \
# -v `pwd`/assets/build/mochitest:/firefox/devtools/client/debugger/new/test/mochitest \
# -v "/tmp/.X11-unix:/tmp/.X11-unix:rw" \
# -e "DISPLAY=unix:99" \
# --ipc host \
# jasonlaster11/mochitest-runner:latest \
# /bin/bash -c "export SHELL=/bin/bash; touch devtools/client/debugger/new/test/mochitest/browser.ini && ./mach build && ./mach mochitest --subsuite devtools devtools/client/debugger/new/test/mochitest/"
# - type: shell
# name: Flow Coverage Report
# shell: /bin/bash --login
# command: |
# set -exu
# mkdir -p /tmp/test-results/flow-coverage
# yarn run flow-coverage -- -t json -o /tmp/test-results/flow-coverage
# bash <(curl -s https://codecov.io/bash) -f /tmp/test-results/flow-coverage/flow-coverage.json
# - type: artifacts-store
# path: /tmp/artifacts
# destination: build
# Upload test results
- type: test-results-store
path: /tmp/test-results