-
Notifications
You must be signed in to change notification settings - Fork 824
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
Adds support for Continous Integration #483
Conversation
python: | ||
- 2.7 | ||
install: | ||
- sudo pip install html5validator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need sudo? Because the builds with sudo: false
are usually faster on travis-ci.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was getting errors without sudo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried the version without sudo and then added sudo: false
to the top of the .yml file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same error:
error: could not create '/usr/local/lib/python2.7/dist-packages/html5validator': Permission denied
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-JMP2ZA/html5validator/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-iH_ZLM-record/install-record.txt --single-version-externally-managed --compile:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks for trying! <3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found a workaround: travis-ci/travis-ci#3139
sudo: false
install:
- pip install --user html5validator
- export PATH=$PATH:$HOME/.local/bin
it works, already tested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay! I will try and merge this tomorrow!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
last commit pushed. all yours . and thanks for everything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the fantastic work on ex_doc and on the website! <3
This looks great, thank you! |
You are welcome José, I'm glad you liked it. :-D |
@@ -0,0 +1,13 @@ | |||
#!/usr/bin/env bash | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see need to add "set -e"
otherwise we will get false positives
jose: could you please test script/cibuild on osx?, and tell me if it's all good. |
Should we close this one then? |
definitely |
I've been wanting to pull this one out for a while, and finally I did it.
This PR adds continuous integration for the Elixir Website,
It runs two different kinds of validation,
html5validator
The W3C Validator developed by W3C and Mozilla.
It uses a precompiled package for python (html5validator).
This is the de-facto validator for html5, it will only check the markup validity
html-proof
html-proof is a Ruby Gem. It will do all kind of validations, in addition to validate markup, it will check for favicons, external scripts being loaded, broken links and also internal broken links, images (internal and external). Anything that can break overtime (specially because we rely on external sources, ie, images, fonts, libraries), this will check for that, every time we make a commit.
The reality is that our website was not passing neither of both validations due to bugs [1,2,3] in these validators, and due nature of the website having hacky code to fix issues with old browsers. So that's why i created a script that will filter the errors in STDERR, and let us run the validators in Travis.
I wish we could validate the css code, but right now it's not possible, because the css it too hacky to support IE6 i think.
Links to the elixir documentation within the website have been disabled, because the /docs/ folder it not hosted within this project, We could configure html-proof to rewrite those relative links to absolute, but right now a bug prevented me from doing so. Anyway, I ran it locally, and I know it's all good.
You can see the travis build here: Usually it's been taking 1m 45sec,
https://travis-ci.org/eksperimental/elixir-lang.github.com