Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Add Tests for the Built Website #134

Open
prikhi opened this issue Oct 7, 2017 · 8 comments · May be fixed by #139
Open

Add Tests for the Built Website #134

prikhi opened this issue Oct 7, 2017 · 8 comments · May be fixed by #139

Comments

@prikhi
Copy link
Contributor

prikhi commented Oct 7, 2017

Would be cool if we could add some tests that'd make sure PRs that just add projects can be merged without breaking the site.

Something simple like:

  • projects.json is well formed
  • The image is 1000x800px
  • The image is optimized
  • ?Check projects.json for duplicate project names?

Maybe test that the Elm code compiles w/o errors or warnings while we're at it?

@knewter
Copy link

knewter commented Oct 13, 2017

@prikhi I'm interested in tackling this, perhaps by using http://coala.io - it seems kind of perfectly suited for this. Would that be ok or would the additional dependency be bothersome? If I don't hear back from you I'll likely make a PR anyway... :D

@prikhi
Copy link
Contributor Author

prikhi commented Oct 14, 2017

Haven't used coala before but seems OK to me 👍 ✨

@knewter
Copy link

knewter commented Oct 14, 2017

I might have to write a custom bear to check the image size but it's easy. Do you do CI anywhere yet? Could run this on travis, should be easy

@prikhi
Copy link
Contributor Author

prikhi commented Oct 14, 2017

There's no CI for this repo atm, Travis is my usual go to.

@knewter
Copy link

knewter commented Oct 14, 2017

I've added a test for duplicate project names in projects.json - there were three, and I renamed them to specify the author after the project name

@knewter
Copy link

knewter commented Oct 14, 2017

getting the image size is way harder than it should be because coala is rejecting raw files even though there's explicitly a setting to allow this. Do you know of a good image linter?

@prikhi
Copy link
Contributor Author

prikhi commented Oct 14, 2017

Dunno what is available on travis, but you could use identify from imagemagick:
identify -format "%wx%h" data/images/ABC-editor.jpg or just the file command w/ greps:

$ file ABC-editor.jpg | grep -oE "[^density] ([[:digit:]]+x[[:digit:]]+)" | grep -oE "\S+$"
1000x800

@joelclermont
Copy link
Collaborator

@knewter Thanks for tackling this project! This is a very welcome addition.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants