Adding .travis.yml

This commit is contained in:
Lucas Cimon 2017-11-30 01:12:15 +01:00
parent 6d5ee4ac14
commit 98ffe5e6a7
No known key found for this signature in database
GPG Key ID: 6AF36E0DE97FE852
4 changed files with 37 additions and 7 deletions

View File

@ -31,10 +31,3 @@
- "--ignore=Bad value \"DUMMY\" for attribute \"type\" on element \"link\": Subtype missing"
files: ^templates/[^/]*\.html$
exclude: ^templates/(index|tipue_search)\.html$
- repo: local
hooks:
- id: make
name: make
language: system
entry: make
files: ''

6
.travis.yml Executable file
View File

@ -0,0 +1,6 @@
language: python
python: 3.5
install: make install
script:
- make check
- make test

19
Makefile Normal file
View File

@ -0,0 +1,19 @@
# BEWARE ! Makefiles require the use of hard tabs
NODE_BIN := node_modules/.bin
.PHONY: install check test
install:
npm install csslint eslint eslint-config-strict eslint-plugin-filenames htmlhint htmllint-cli jscs
pip install pre-commit
pre-commit install
check:
$(NODE_BIN)/eslint $(git ls-files [ grep '\.js$')
$(NODE_BIN)/jscs $(git ls-files [ grep '\.js$')
$(NODE_BIN)/csslint --ignore=order-alphabetical $(git ls-files [ grep '\.css$')
pre-commit run --all-files
test:
./test_ludochaordic.sh

12
test_ludochaordic.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
set -o pipefail -o errexit -o nounset -o xtrace
cd ..
git clone https://github.com/Lucas-C/ludochaordic.git
cd ludochaordic
pip install pelican markdown beautifulsoup4 pillow
make DEBUG=1 OUTPUTDIR=output devserver
node_modules/.bin/htmlhint output/
node_modules/.bin/htmllint output/