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

Run Lighthouse against a local server per push #216

Merged
merged 8 commits into from
Jul 9, 2020

Conversation

bollwyvl
Copy link
Collaborator

This moves the lighthouse audit into the main, PR-visible workflow, and runs the audit against localhost, as served by a local tornado server with some basic stuff configured: gzip, basically-infinite caching.

Since it can actually be iterated on, I've gone ahead and also added the threshold check (with a little wiggle room), and do a check against a random smattering of pages, though it would probably make sense to hit all of them at some future point.

I think this is getting pretty close!

@bollwyvl
Copy link
Collaborator Author

Since there are more files, I am also putting the artifacts into a sub-folder with the build number, so they are a little easier to keep together, which i have found to be important when iterating on these kinds of things.

@choldgraf
Copy link
Collaborator

choldgraf commented Jun 25, 2020

Hey all - I just want to flag that I'm getting concerned about the amount of extra complexity that we are starting to add to the repository. I think that adding lighthouse would certainly help, and that we should be working towards improving the HTML that the theme uses. That said, can we guarantee that we'll be able to maintain this machinery when it breaks, when it needs to be improved, etc?

Somebody feel free to tell me "these changes really aren't that big, and they're simple enough that they shouldn't break" - I must admit that it all looks Greek to me, so I'm not in a good position to judge their complexity, but I wanted to voice this concern to make sure we can discuss. I don't want this to come across as me shooting down this work - I think it's awesome and I really appreciate @bollwyvl putting in the effort to make these improvements. I am open to being and hope to be convinced that I'm being overly conservative here...

signed,
the crusty old man who thought that we were already adding too much complexity when we started using webpack :-)

@bollwyvl
Copy link
Collaborator Author

bollwyvl commented Jun 25, 2020 via email

@choldgraf
Copy link
Collaborator

choldgraf commented Jun 25, 2020

Thanks for framing it that way. IMO:

performance, security and accessibility

Are worthwhile goals to increase complexity for. I just want to make sure our decisions to do so are made diligently 👍

@jorisvandenbossche
Copy link
Member

Yeah, @choldgraf, I certainly share your general concern. But I also want to ensure that the people who know more about this web stuff, like @bollwyvl, can do their thing ;), as the theme will benefit from that as well. But it's certainly a trade-off to keep being careful about.

Now about the actual PR: @bollwyvl, so we now have an additional "audit" check, that has a check for the minimum scores ("lighthouse-check: Scores passed minimum requirement ✅"), and has the actual html reports as artifact.
Right now that needs to be downloaded to inspect. Would it be possible (maybe as future improvement) to host this as well online for a PR like the docs are hosted with circle_ci ?

@bollwyvl
Copy link
Collaborator Author

bollwyvl commented Jul 6, 2020

Would it be possible (maybe as future improvement) to host this as well online for a PR like the docs are hosted with circle_ci ?

I'm sure they could be. Actually using circle seems like too great of a dependency between the two providers, however. Unlike the demo site, these are flat files, so they could be posted to a gist... weirdly i don't see a handy-dandy action for it, but I'm pretty sure cURL could do it. Otherwise there's netlify, etc...

@jorisvandenbossche
Copy link
Member

OK. The PR is ready to merge from your side?

@bollwyvl
Copy link
Collaborator Author

bollwyvl commented Jul 7, 2020

OK. The PR is ready to merge from your side?

Indeed, if only to get the broken one pointed at circle out of there!

Did a little looking into netlify... it is free for open source, but doesn't really have shared auth, so it might need a bot account to own the credentials. Probably similar for the gist approach. Binder of course, would work... but you wouldn't want to build a whole, brand new docker container to view 3+ html files... but having an nbgitpuller bring in a gist would probably be fine. Apparently there's a way to get the raw JSON back out, as well, so maybe a notebook that loads those into a dataframe would be nice, as well.

@bollwyvl bollwyvl closed this Jul 7, 2020
@bollwyvl bollwyvl reopened this Jul 7, 2020
@jorisvandenbossche jorisvandenbossche merged commit 2cb2bed into pydata:master Jul 9, 2020
@jorisvandenbossche
Copy link
Member

OK, let's see how it goes now ;)

@bollwyvl
Copy link
Collaborator Author

bollwyvl commented Jul 9, 2020 via email

@bollwyvl bollwyvl mentioned this pull request Aug 26, 2021
15 tasks
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.

3 participants