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

tests: fix split of smoke tests across jobs #12323

merged 2 commits into from
Apr 5, 2021

Conversation

brendankenny
Copy link
Member

I noticed today that the CI smoke tests have all been running the full suite of tests instead of splitting them up.

The --invert-match ${{ matrix.smoke-test-invert }} $SMOKE_GROUP_1 flags were being added at the end of the yarn smoke:cicoverage command, but when smoke switched to smoke-with-coverage, the command they were being added to was just the report generation one, yarn c8 report --reporter text-lcov > smoke-coverage.lcov, which does nothing with those flags.

Rather than making yet another npm script for generating the text-lcov, since the codecov upload only takes place in the CI script now, it makes sense to only generate the file to upload to codecov there as well.

@brendankenny brendankenny requested a review from a team as a code owner April 1, 2021 00:03
@brendankenny brendankenny requested review from adamraine and removed request for a team April 1, 2021 00:03
@google-cla google-cla bot added the cla: yes label Apr 1, 2021
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!

@brendankenny
Copy link
Member Author

smoke stable/ToT back down to 5-8 minutes instead of e.g. 12-16 minutes in the last landed PR (https://github.com/GoogleChrome/lighthouse/runs/2234611603)

package.json Outdated
"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",
"smoke:cicoverage": "yarn c8 yarn smoke -j=1 --retries=2",
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we just remove the -j and --retries flags here? better defined in the yml anyhow

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought about that but then didn't do it because what's the point of having a cicoverage npm script just to call yarn c8 yarn smoke since it's not ci-specific and it only really works with the extra flags? Well...there is no point, so let's move those to the yml and delete this :)

@brendankenny
Copy link
Member Author

@adamraine (or @connorjclark) yah?

"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 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants