This is a bot to integrate Lighthouse with Github Pull Requests.
If you don't know what lighthouse is you should check this google presentation.
The TLDR version is; It's a tool that audits web pages check and rating performance, accessibility, and more.
The main motivation of this library is to help people to perform quick comparisons between two URL performances within PRs, this might be helpful to check if the code of that PR increases or decreases overall perfomance when compared to production.
- Clone this repository to a server
- Install dependencies
- Ruby
- Redis
- Rubygems & Lighthouse with
bash bin/setup
- Install gems with
bundle install
- Set two env variables
GH_USERNAME
andGH_PASSWORD
- Make sure the Github user is watching the repositories you want.
Once everything is properly set all you need to do is to start sidekiq
for the \workers\*
folder.
You might want to start is a deamon. Make sure you run it within the main folder of the project.
Example.
sidekiq -C config/sidekiq.yml -r ./workers/* -d -L sidekiq.log
This will start sidekiq
using the correct config, as deamon, and put the logs into sidekiq.log
.
To use it mention @lightbot
on a PR with two URLs you want it to compare.
Make sure the github account is watching the repository.
@lightbot run http://staging.joaomdmoura.com http://joaomdmoura.com
Lightbot uses polling to catch new mentions, so it might take up to 5 minutes for it to leave a comment on the PR with the reuslts.