forked from betagouv/beta.gouv.fr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
24 lines (22 loc) · 1.11 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
machine:
java: # see <https://github.com/svenkreiss/html5validator#integration-with-circleci>
version: oraclejdk8
environment:
NOKOGIRI_USE_SYSTEM_LIBRARIES: true # Faster installation of nokogiri, required by html-proofer
dependencies:
post:
- pip install --user html5validator
- bundle exec jekyll --version # print it out
test:
pre:
- bundle exec jekyll build --safe
- bundle exec jekyll serve --no-watch --skip-initial-build: # separate build from serve to ensure that the root URL is not set to localhost
background: true
- while ! curl --silent http://localhost:4000; do sleep 1; done # wait for server to start
override:
- bundle exec jekyll doctor # test the configuration file
- test -s _site/index.html # test that something was actually compiled
- ruby rb/bin/htmlproofer ./_site --assume-extension --check-html --disable-external --empty-alt-ignore --check-img-http # test inner links
- html5validator --root _site # test HTML compliance
- ruby rb/test/opengraph.rb # test social cards
- bundle exec jsonlint _site/api/v1/* # test the API