Skip to content
This repository was archived by the owner on Jun 22, 2021. It is now read-only.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

31 Commits

Folders and files

Repository files navigation

Demo Travis wait on Netlify

Experiment to run Lighthousebot after Netlify deploys by waiting for the deploy in Travis CI.

While this experiment works, a cleaner solution is triggering Lighthouse CI from a Netlify function on successful deploy.

Result

See example PR.

How it works

  • Netlify builds and deploys site preview
  • Meanwhile Travis CI starts and waits for Netlify deploy
  • Then Travis CI run lighthousebot which runs Lighthouse CI and comments on PR

To ensure Travis waits for the new deploy, Netlify creates a unique file with the name of the commit SHA and Travis in turn waits for that file to be present:

NETLIFY_PREVIEW_SLUG="deploy-preview-$TRAVIS_PULL_REQUEST"
NETLIFY_PREVIEW_URL="https://$NETLIFY_PREVIEW_SLUG--lighthousebot-tests.netlify.com/"

npm run ci:wait -- "$NETLIFY_PREVIEW_URL$TRAVIS_PULL_REQUEST_SHA.txt"
npm run ci:lighthouse -- "$NETLIFY_PREVIEW_URL"

see .travis.yml.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages