This repository has been archived by the owner on Jan 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 123
/
circle.yml
159 lines (159 loc) · 4.6 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
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
version: 2.0
notify:
branches:
only:
- master
- l10n
jobs:
build:
docker:
- image: circleci/node:8.9.4
working_directory: ~/testpilot
steps:
- checkout
- restore_cache:
keys:
- node-modules-
- run:
name: Setup env
command: |
curl -L -o ~/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 && chmod +x ~/bin/jq
./bin/circleci/install-node-dependencies.sh
- run:
name: Build addon and frontend
command: |
sudo ./bin/circleci/build-addon.sh
sudo ./bin/circleci/build-version-json.sh
sudo ./bin/circleci/build-frontend.sh
- store_artifacts:
path: ~/testpilot/addon/update.rdf
- store_artifacts:
path: ~/testpilot/addon/addon.xpi
- store_artifacts:
path: ~/testpilot/frontend.zip
- persist_to_workspace:
root: .
paths:
- ./*
- save_cache:
key: node-modules-
paths:
- addon/node_modules
unit_test:
docker:
- image: circleci/node:8.9.4
steps:
- attach_workspace:
at: .
- run: ./bin/circleci/test-addon.sh
- run: ./bin/circleci/test-frontend.sh
integration_test:
docker:
- image: circleci/node:8.9.4
environment:
- MOZ_HEADLESS: 1
steps:
- attach_workspace:
at: .
- restore_cache:
keys:
- integration-test-{{ checksum "frontend/test/ui/requirements/flake8.txt" }}
- integration-test-{{ checksum "frontend/test/ui/requirements/requirements.txt" }}
- integration-test-
- run:
name: Set hosts
command: |
echo 127.0.0.1 example.com | sudo tee -a /etc/hosts
cat /etc/hosts
- run:
name: Install dependencies
command: ./bin/circleci/install-test-dependencies.sh
- run:
name: Flake8
command: ./bin/circleci/flake8.sh
- run: mkdir integration-test-results
- run:
name: Test Firefox Release
command: ./bin/circleci/test-firefox-release.sh
- run:
name: Test Firefox Nightly
command: ./bin/circleci/test-firefox-nightly.sh
- store_artifacts:
path: ~/project/integration-test-results
- save_cache:
key: integration-test-{{ checksum "frontend/test/ui/requirements/flake8.txt" }}
paths:
- frontend/test/ui/requirements/flake8.txt
- save_cache:
key: integration-test-{{ checksum "frontend/test/ui/requirements/requirements.txt" }}
paths:
- frontend/test/ui/requirements/requirements.txt
- save_cache:
key: integration-test-
paths:
- .tox
static_and_storybook_deploy:
docker:
- image: circleci/node:8.9.4
steps:
- attach_workspace:
at: .
- run:
name: Install AWSCLI
command: |
sudo apt-get install python-pip python-dev build-essential
sudo pip install --upgrade pip
sudo pip install awscli --upgrade
- run:
name: Storybook Deploy
command: ./bin/deploy-storybook.sh
- run:
name: Static deployment
command: |
TESTPILOT_BUCKET=testpilot.dev.mozaws.net ./bin/circleci/do-exclusively.sh --branch master ./bin/deploy.sh dev
./bin/circleci/invalidate-cloudfront-cache.sh E2ERG47PHCWD0Z
l10n_deploy:
docker:
- image: circleci/node:8.9.4
steps:
- attach_workspace:
at: .
- run:
name: Install AWSCLI
command: |
sudo apt-get install python-pip python-dev build-essential
sudo pip install --upgrade pip
sudo pip install awscli --upgrade
- run:
name: l10n deployment
command: |
TESTPILOT_BUCKET=testpilot-l10n.dev.mozaws.net ./bin/deploy.sh dev
./bin/circleci/invalidate-cloudfront-cache.sh ELL21V1NJAJJ8
workflows:
version: 2
build_test_deploy:
jobs:
- build
- unit_test:
requires:
- build
- integration_test:
requires:
- build
filters:
branches:
ignore:
- l10n
- static_and_storybook_deploy:
requires:
- unit_test
- integration_test
filters:
branches:
only: master
- l10n_deploy:
requires:
- unit_test
filters:
branches:
only: l10n