|
12 | 12 | - image: circleci/node:10.15
|
13 | 13 | working_directory: ~/repo
|
14 | 14 | steps:
|
15 |
| - - checkout |
16 |
| - |
17 |
| - - browser-tools/install-chrome |
| 15 | + - checkout |
18 | 16 |
|
19 | 17 | # Download and cache dependencies
|
20 | 18 | - restore_cache:
|
|
30 | 28 |
|
31 | 29 | - run: make build RELEASE_BRANCH=${CIRCLE_BRANCH}
|
32 | 30 |
|
33 |
| - - run: |
34 |
| - name: run Lighthouse CI |
35 |
| - command: | |
36 |
| - sudo npm install -g @lhci/cli |
37 |
| - lhci autorun || echo "LHCI failed!" |
38 |
| - environment: |
39 |
| - # LHCI_SERVER_BASE_URL, LHCI_SERVER_USERNAME, LHCI_SERVER_PASSWORD, LHCI_TOKEN, |
40 |
| - # is defined in Environment Variables of circleci project |
41 |
| - LHCI_SERVER_BASE_URL=${LHCI_SERVER_BASE_URL} |
42 |
| - LHCI_USERNAME=${LHCI_SERVER_USERNAME} |
43 |
| - LHCI_PASSWORD=${LHCI_SERVER_PASSWORD} |
44 |
| - LHCI_TOKEN=${LHCI_TOKEN} |
45 |
| - |
46 | 31 | - run: rm -rf node_modules
|
47 | 32 |
|
48 | 33 | # Download and cache dependencies for running
|
@@ -172,10 +157,41 @@ jobs:
|
172 | 157 | kubectl set image deployment/${DEPLOYMENT} ${APP}=gcr.io/${GOOGLE_PROJECT_ID}/${APP}:$CIRCLE_BRANCH-$PKG_VER -n $CLUSTER_NAMESPACE
|
173 | 158 | fi
|
174 | 159 | kubectl rollout status deployment/${DEPLOYMENT} -n $CLUSTER_NAMESPACE
|
| 160 | + lighthouseci: |
| 161 | + docker: |
| 162 | + # specify the version you desire here |
| 163 | + - image: circleci/node:10.15 |
| 164 | + working_directory: ~/repo |
| 165 | + steps: |
| 166 | + - checkout |
| 167 | + - browser-tools/install-chrome |
| 168 | + |
| 169 | + # Download and cache dependencies |
| 170 | + - restore_cache: |
| 171 | + keys: |
| 172 | + - v1-dependencies-build-{{ checksum "yarn.lock" }} |
| 173 | + - run: yarn install --frozen-lockfile |
| 174 | + - save_cache: |
| 175 | + paths: |
| 176 | + - node_modules |
| 177 | + key: v1-dependencies-build-{{ checksum "yarn.lock" }} |
| 178 | + - run: |
| 179 | + name: run Lighthouse CI |
| 180 | + command: | |
| 181 | + sudo npm install -g @lhci/cli |
| 182 | + lhci autorun || echo "LHCI failed!" |
| 183 | + environment: |
| 184 | + # LHCI_SERVER_BASE_URL, LHCI_SERVER_USERNAME, LHCI_SERVER_PASSWORD, LHCI_TOKEN, |
| 185 | + # is defined in Environment Variables of circleci project |
| 186 | + LHCI_SERVER_BASE_URL=${LHCI_SERVER_BASE_URL} |
| 187 | + LHCI_USERNAME=${LHCI_SERVER_USERNAME} |
| 188 | + LHCI_PASSWORD=${LHCI_SERVER_PASSWORD} |
| 189 | + LHCI_TOKEN=${LHCI_TOKEN} |
175 | 190 |
|
176 | 191 | workflows:
|
177 | 192 | build_and_deploy:
|
178 | 193 | jobs:
|
| 194 | + - lighthouseci: |
179 | 195 | - build:
|
180 | 196 | filters:
|
181 | 197 | branches:
|
|
0 commit comments