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: add CI test to confirm sample_v2.json is up to date #4956

Merged
merged 5 commits into from
Apr 13, 2018
Merged

Conversation

paulirish
Copy link
Member

@paulirish paulirish commented Apr 12, 2018

from #4951 (comment)

is this what ya'll were thinking?


Currently changes within LHR.timing are ignored. I could also see us ignore changes to auditResult.helpText to make kayce's PRs easier.

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

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

LGTM! some nits

#!/usr/bin/env bash

##
# @license Copyright 2017 Google Inc. All Rights Reserved.
Copy link
Collaborator

Choose a reason for hiding this comment

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

2018 ;)

@@ -0,0 +1,26 @@
#!/usr/bin/env node
Copy link
Collaborator

Choose a reason for hiding this comment

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

wanna kebab-case this file?

@@ -0,0 +1,49 @@
#!/usr/bin/env bash
Copy link
Collaborator

Choose a reason for hiding this comment

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

wanna kebab-case this sucker?

@@ -36,6 +36,7 @@ script:
- yarn unit:silentcoverage
- yarn type-check
- yarn closure
- yarn diff:sample-json
Copy link
Collaborator

@patrickhulce patrickhulce Apr 12, 2018

Choose a reason for hiding this comment

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

let's throw it into yarn test too for local snazziness :)

might need to revert the file to original state though?

Copy link
Member Author

Choose a reason for hiding this comment

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

might need to revert the file to original state though?

For CI: no changes, so no worries, right? right.

For local: yes, working copy could have changes already. In this case, it seems like you'd want to get reported on the fact that your working copy, while changed, is still not where it needs to be. But it seems like you wouldn't want a failure when you've already bumped the JSON.

if [ $retVal -eq 0 ]; then
colorText "✅ PASS. No change in LHR." "$green"
else
colorText "❌ FAIL. LHR has changed." "$red"
Copy link
Member

Choose a reason for hiding this comment

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

should this include something like "make sure to run update:sample-json and check in the result?"

Copy link
Member Author

Choose a reason for hiding this comment

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

great idea.

*/
'use strict';

/** @fileoverview Read in a LHR JSON file, remove whatever shouldn't be compared, write it back. */
Copy link
Member

Choose a reason for hiding this comment

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

rename file (cleanup-LHR-for-diff.js?) maybe? Unclear what the cleanup is for

Copy link
Member Author

Choose a reason for hiding this comment

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

sg done

@brendankenny
Copy link
Member

from the failing tests (this test :), I think you need to rebase?

Copy link
Member

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

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

LGTM!

@paulirish paulirish merged commit 0db69e5 into master Apr 13, 2018
@paulirish paulirish deleted the goldenlhr branch April 13, 2018 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants