Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: run ToT and stable Chrome for smoke tests in github workflow #10989

Merged
merged 26 commits into from
Jun 18, 2020
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install protobuf==3.7.1

# Chrome Stable is already installed by default.
- name: Install Chrome ToT
run: bash lighthouse-core/scripts/download-chrome.sh
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK there's no caching w/ this approach. I don't think we want to cache ToT installation, right?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could see us caching within the same day or something, but I agree we don't want to cache for very long. either way followup seems fine.

env:
connorjclark marked this conversation as resolved.
Show resolved Hide resolved
CHROME_PATH: /home/runner/chrome-tot
connorjclark marked this conversation as resolved.
Show resolved Hide resolved
- run: mv chrome-linux /home/runner/chrome-linux-tot

# Cache yarn deps. thx https://github.com/actions/cache/blob/master/examples.md#node---yarn
- name: Get yarn cache directory path
Expand All @@ -62,10 +69,17 @@ jobs:
- run: sudo apt-get install xvfb
- run: xvfb-run --auto-servernum yarn unit
- run: xvfb-run --auto-servernum yarn test-clients
- run: xvfb-run --auto-servernum yarn smoke --debug -j=1 --retries=2
- run: xvfb-run --auto-servernum yarn test-bundle
- run: xvfb-run --auto-servernum yarn test-docs

- name: Smoke (ToT)
run: xvfb-run --auto-servernum yarn smoke --debug -j=1 --retries=2
env:
CHROME_PATH: /home/runner/chrome-linux-tot/chrome
- name: Smoke (stable)
run: xvfb-run --auto-servernum yarn smoke --debug -j=1 --retries=2


- run: yarn test-lantern
- run: yarn test-legacy-javascript
- run: yarn i18n:checks
Expand Down
13 changes: 13 additions & 0 deletions lighthouse-core/scripts/download-chrome-canary.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

##
# @license Copyright 2017 The Lighthouse Authors. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
##

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install -y google-chrome-canary --no-install-recommends # Not a thing lol.
sudo apt-get clean
2 changes: 2 additions & 0 deletions lighthouse-core/scripts/download-chrome.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

# Download chrome inside of our CI env.

echo "CHROME_PATH $CHROME_PATH"

if [ "$APPVEYOR" == "True" ]; then
url="https://download-chromium.appspot.com/dl/Win?type=snapshots"
else
Expand Down