-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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: split CI into unit and smoke workflows #12422
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
name: smoke | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: # run on all PRs, not just PRs to a particular branch | ||
|
||
jobs: | ||
# `smoke` runs as a matrix across 4 jobs: | ||
# * The smoketest groups are split across two runners, to parallelize. | ||
# * Then, those are run with both Chrome stable and ToT Chromium, in parallel | ||
smoke: | ||
strategy: | ||
matrix: | ||
chrome-channel: ['stable', 'ToT'] | ||
smoke-test-invert: [false, true] | ||
# e.g. if set 1 fails, continue with set 2 anyway | ||
fail-fast: false | ||
runs-on: ubuntu-latest | ||
env: | ||
# The smokehouse tests run by job `test set 1`. `test set 2` will run the rest. | ||
SMOKE_GROUP_1: a11y oopif pwa pwa2 pwa3 dbw redirects errors offline | ||
# Job named e.g. "Chrome stable, test set 1". | ||
name: Chrome ${{ matrix.chrome-channel }}, group ${{ matrix.smoke-test-invert == false && '1' || '2' }} | ||
|
||
steps: | ||
- name: git clone | ||
uses: actions/checkout@v2 | ||
with: | ||
# Depth of at least 2 for codecov coverage diffs. See https://github.com/GoogleChrome/lighthouse/pull/12079 | ||
fetch-depth: 2 | ||
|
||
- name: Use Node.js 12.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
|
||
- name: Define ToT chrome path | ||
if: matrix.chrome-channel == 'ToT' | ||
run: echo "CHROME_PATH=/home/runner/chrome-linux-tot/chrome" >> $GITHUB_ENV | ||
|
||
# Chrome Stable is already installed by default. | ||
- name: Install Chrome ToT | ||
if: matrix.chrome-channel == 'ToT' | ||
working-directory: /home/runner | ||
run: bash $GITHUB_WORKSPACE/lighthouse-core/scripts/download-chrome.sh && mv chrome-linux chrome-linux-tot | ||
|
||
- run: yarn install --frozen-lockfile --network-timeout 1000000 | ||
|
||
- run: sudo apt-get install xvfb | ||
- name: Run smoke tests | ||
run: | | ||
xvfb-run --auto-servernum yarn c8 yarn smoke --debug -j=1 --retries=2 --invert-match ${{ matrix.smoke-test-invert }} $SMOKE_GROUP_1 | ||
yarn c8 report --reporter text-lcov > smoke-coverage.lcov | ||
|
||
- name: Upload test coverage to Codecov | ||
if: matrix.chrome-channel == 'ToT' | ||
uses: codecov/codecov-action@6004246f47ab62d32be025ce173b241cd84ac58e | ||
with: | ||
flags: smoke | ||
file: ./smoke-coverage.lcov | ||
|
||
# Fail if any changes were written to source files. | ||
- run: git diff --exit-code | ||
|
||
# Only run smoke tests for windows against stable chrome. | ||
smoke-windows: | ||
runs-on: windows-latest | ||
name: Chrome stable, Windows | ||
|
||
steps: | ||
- name: git clone | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js 12.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
|
||
- run: yarn install --frozen-lockfile --network-timeout 1000000 | ||
|
||
- name: Run smoke tests | ||
# Windows bots are slow, so only run enough tests to verify matching behavior. | ||
run: yarn smoke --debug -j=1 --retries=2 dbw oopif offline lantern metrics | ||
|
||
# Fail if any changes were written to source files. | ||
- run: git diff --exit-code | ||
|
||
smoke-bundle: | ||
runs-on: ubuntu-latest | ||
name: Bundled Lighthouse | ||
|
||
steps: | ||
- name: git clone | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js 12.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
|
||
- run: yarn install --frozen-lockfile --network-timeout 1000000 | ||
- run: yarn build-devtools | ||
|
||
- run: sudo apt-get install xvfb | ||
- name: yarn test-bundle | ||
run: xvfb-run --auto-servernum yarn test-bundle | ||
|
||
# Fail if any changes were written to source files. | ||
- run: git diff --exit-code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nothing changed in here but a few comments and the
name
values for all three jobs