Navigation Menu

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

Woff2 test #13559

Closed
wants to merge 9 commits into from
Closed

Woff2 test #13559

wants to merge 9 commits into from

Conversation

Findus23
Copy link
Member

@Findus23 Findus23 commented Oct 8, 2018

related to #12695 and fixes #13210

While @diosmosis' idea of running woff2_compress on travis is probably the best solution, I think checking if both files have been modified at the same time should also work and is much simpler.

The test seems to work locally, but someone should take a look (and afterwards all files need to be updated to fix the test)

@Findus23 Findus23 added c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. Needs Review PRs that need a code review labels Oct 8, 2018
@tsteur
Copy link
Member

tsteur commented Oct 8, 2018

Can you maybe test if it fails when updating the woff files but not woff2 as a test? if then the build fails it should work 👍

@Findus23
Copy link
Member Author

Findus23 commented Oct 8, 2018

When you commit woff, but not woff2 the time difference between the two commits should be more than 24 hours and the test should fail.
But you probably won't get that far as without updating the woff2 the browser won't show the changes during development.

@Findus23
Copy link
Member Author

Findus23 commented Oct 8, 2018

I'm not entirely sure why the test didn't fail:
https://travis-ci.org/matomo-org/matomo/jobs/438743756

@mattab mattab added this to the 3.6.1 milestone Oct 9, 2018
@tsteur
Copy link
Member

tsteur commented Oct 10, 2018

fyi in case it helps what I'm getting:

$ git log -1 --format='%ad' plugins/Morpheus/fonts/matomo.woff
Wed May 2 07:59:51 2018 +1200
$ git log -1 --format='%ad' plugins/Morpheus/fonts/matomo.woff2
Wed Jul 25 21:54:48 2018 +0200

@tsteur tsteur modified the milestones: 3.6.1, 3.7.0 Oct 10, 2018
@tsteur
Copy link
Member

tsteur commented Oct 10, 2018

I don't know if it is supposed to fail right now?
Could echo some information on travis... eg var_dump($woff_last_change);var_dump($woff2_last_change);

@diosmosis
Copy link
Member

Started debugging this on the travis-debug branch, for some reason the date for matomo.woff is the same as the date for matomo.woff2, but only on travis.

@diosmosis
Copy link
Member

Tried getting the remote branch log (git log -1 origin/... ...), but that didn't work on travis either... super strange.

@tsteur
Copy link
Member

tsteur commented Oct 11, 2018

It's not needed to have this in 3.6.1 just fyi

@diosmosis
Copy link
Member

I already gave up on debugging it :)

@Findus23
Copy link
Member Author

It is supposed to fail now as they weren't committed at the same time and my plan was then to recommit them afterwards to fix it.
Thanks for confirming that it's not me going crazy 🙂

@tsteur
Copy link
Member

tsteur commented Oct 11, 2018

Maybe travis-ci/travis-ci#7254 (comment) helps?

@Findus23
Copy link
Member Author

@tsteur That makes sense. Travis probably does a git clone --max-depth=0 and therefore doesn't know what happened before. But I guess a full clone would be far slower, so I guess this test isn't possible.

@tsteur
Copy link
Member

tsteur commented Oct 11, 2018

👍 shall we close this PR then?

@diosmosis
Copy link
Member

Was hoping getting the log from the origin remote would get around the lack of history, but it didn't...

@Findus23
Copy link
Member Author

Unfortunatly

@Findus23 Findus23 closed this Oct 11, 2018
@diosmosis
Copy link
Member

Thought of a way to do the test this way, could use the github API to get the last modified time (using whatever travis environment variable gets the commit hash). Probably wouldn't work on PRs, but doesn't really have to. @Findus23 would you have time for this? Found an example request here: https://stackoverflow.com/questions/50194241/get-when-the-file-was-last-updated-from-a-github-repository

@diosmosis diosmosis reopened this Feb 25, 2019
@diosmosis diosmosis modified the milestones: 3.8.0, 3.9.0 Feb 25, 2019
@diosmosis
Copy link
Member

Made the change to use the github API and ran into another problem, rate limiting due to travis-ci usage. Need to create a bare oauth token and use as a secure travis env variable if want to continue down this path.

cc @tsteur / @mattab

@mattab mattab modified the milestones: 3.9.0, 3.10.0 Mar 18, 2019
@mattab
Copy link
Member

mattab commented May 28, 2019

Need to create a bare oauth token and use as a secure travis env variable if want to continue down this path.

@diosmosis Is this the only task left to do? if so I can do this. Can you send the link to the github guide to follow?

@mattab mattab modified the milestones: 3.10.0, 3.11.0 May 28, 2019
@diosmosis
Copy link
Member

diosmosis commented May 28, 2019

@mattab should follow https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line and give the token no permissions. Then need to add it as a secure environment variable to travis-ci: https://docs.travis-ci.com/user/environment-variables/#encrypting-environment-variables

@tsteur
Copy link
Member

tsteur commented Jul 16, 2019

@mattab @diosmosis what's the status here? @mattab I suppose you need to do something here?

@diosmosis
Copy link
Member

@tsteur two options:

  • Add a github oauth token to travis-ci so we can make API requests to the github API for this one check.
  • Or somehow get woff2_compress to be installed on travis-ci.

I don't know if either are high value enough to spend time on.

@tsteur
Copy link
Member

tsteur commented Jul 16, 2019

@diosmosis now that we use chrome for tests, maybe chrome loads the woff2 anyway and this test is not needed anymore?

@diosmosis
Copy link
Member

@tsteur this test is to make sure the woff2 file is up to date, since it has to be generated manually after every change to the icon font file. So we need to run woff2_compress in travis and compare w/ the file or some other way to make sure we know it is up to date. I guess it's not super important if we don't have this test, but I suspect someone will forget w/o the check.

@diosmosis
Copy link
Member

Or do you mean because chrome will try to use woff2 first? If so, I guess we don't need this then...

@tsteur
Copy link
Member

tsteur commented Jul 17, 2019

Or do you mean because chrome will try to use woff2 first? If so, I guess we don't need this then...

That's what I meant. We're mentioning it also first in the font so likely this should be the case.

@diosmosis
Copy link
Member

Ok, I'll close this then. No issue for me if someone wants to re-open and finish this, but it doesn't seem necessary anymore.

@diosmosis diosmosis closed this Jul 17, 2019
@diosmosis diosmosis deleted the woff2-test branch November 19, 2019 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create automated test to make sure woff2 files are up to date
4 participants