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: fix split of smoke tests across jobs #12323

Merged
merged 2 commits into from
Apr 5, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ jobs:
if: matrix.os == 'ubuntu-latest'

- name: yarn unit
run: xvfb-run --auto-servernum yarn unit:cicoverage
run: |
xvfb-run --auto-servernum yarn unit:cicoverage
yarn c8 report --reporter text-lcov > unit-coverage.lcov
Copy link
Member Author

Choose a reason for hiding this comment

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

unit coverage didn't matter for this since we don't pass extra flags to it, but it made sense to do both in the same way.

Copy link
Collaborator

Choose a reason for hiding this comment

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

much better than doing in package.json!

if: matrix.os == 'ubuntu-latest'
- name: Upload test coverage to Codecov
if: matrix.os == 'ubuntu-latest'
Expand Down Expand Up @@ -174,7 +176,9 @@ jobs:

- run: sudo apt-get install xvfb
- name: Run smoke tests
run: xvfb-run --auto-servernum yarn smoke:cicoverage --debug -j=1 --retries=2 --invert-match ${{ matrix.smoke-test-invert }} $SMOKE_GROUP_1
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'
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,9 @@
"cli-unit": "yarn unit-cli",
"viewer-unit": "yarn unit-viewer",
"watch": "yarn unit-core --watch",
"unit:cicoverage": "yarn c8 --all yarn unit:ci && yarn c8 report --reporter text-lcov > unit-coverage.lcov",
"unit:cicoverage": "yarn c8 --all yarn unit:ci",
"coverage": "yarn unit:cicoverage && c8 report --reporter html",
"smoke:cicoverage": "yarn c8 yarn smoke -j=1 --retries=2 && yarn c8 report --reporter text-lcov > smoke-coverage.lcov",
"coverage:smoke": "yarn smoke:cicoverage && c8 report --reporter html",
"coverage:smoke": "yarn c8 yarn smoke -j=1 && c8 report --reporter html",
Copy link
Member

Choose a reason for hiding this comment

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

nit: Any reason this can't be smoke:cicoverage to match unit:cicoverage?

Copy link
Member Author

Choose a reason for hiding this comment

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

nit: Any reason this can't be smoke:cicoverage to match unit:cicoverage?

coverage:smoke is to match coverage...it's meant for if you want to run coverage locally, so it generates an html version of the coverage report for human consumption. I assume it's called coverage and not coverage:unit because there was only the one kind of coverage back when it was named 🤷

"coveralls": "cat unit-coverage.lcov | coveralls",
"devtools": "bash lighthouse-core/scripts/roll-to-devtools.sh",
"chrome": "node lighthouse-core/scripts/manual-chrome-launcher.js",
Expand Down