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

misc: upgrade lhci dogfood script #9879

Merged
merged 1 commit into from
Oct 25, 2019
Merged
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
14 changes: 3 additions & 11 deletions lighthouse-core/scripts/dogfood-lhci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,12 @@ if ! echo "$CHANGED_FILES" | grep -E 'report|lhci' > /dev/null; then
exit 0
fi

# Generate an HTML report and copy into static-server directory for serving.
# Generate HTML reports in ./dist/now/
yarn now-build
cp ./dist/now/english/index.html ./lighthouse-cli/test/fixtures/lhci.report.html

# Install LHCI
npm install -g @lhci/cli@next
# Start up a test server.
yarn static-server &
# Wait for the server to start before hitting it with data.
sleep 10
# Collect our LHCI results.
lhci collect --url=http://localhost:10200/lhci.report.html
lhci collect --build-dir=./dist/now/english/
# Upload the results to our canary server.
lhci upload --serverBaseUrl="$LHCI_CANARY_SERVER_URL" --token="$LHCI_CANARY_SERVER_TOKEN"

# Kill the static server from earlier.
kill $!
lhci upload --serverBaseUrl="$LHCI_CANARY_SERVER_URL" --token="$LHCI_CANARY_SERVER_TOKEN" --github-token="$BUNDLESIZE_GITHUB_TOKEN"
Copy link
Member

Choose a reason for hiding this comment

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

--github-token="$BUNDLESIZE_GITHUB_TOKEN"

I assume this works and has a good reason to happen :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Works great :)

image

Haha, yeah we just need any github token that can set status checks on our repo, so seemed better to reuse than have two floating around with potentially wider access?