From 98ffe5e6a7a8640401e50970b271e84273ac0ba7 Mon Sep 17 00:00:00 2001 From: Lucas Cimon Date: Thu, 30 Nov 2017 01:12:15 +0100 Subject: [PATCH] Adding .travis.yml --- .pre-commit-config.yaml | 7 ------- .travis.yml | 6 ++++++ Makefile | 19 +++++++++++++++++++ test_ludochaordic.sh | 12 ++++++++++++ 4 files changed, 37 insertions(+), 7 deletions(-) create mode 100755 .travis.yml create mode 100644 Makefile create mode 100755 test_ludochaordic.sh diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 294d629..cf96743 100755 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: '' diff --git a/.travis.yml b/.travis.yml new file mode 100755 index 0000000..053efe6 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +language: python +python: 3.5 +install: make install +script: + - make check + - make test diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ced1b70 --- /dev/null +++ b/Makefile @@ -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 diff --git a/test_ludochaordic.sh b/test_ludochaordic.sh new file mode 100755 index 0000000..dd2aecc --- /dev/null +++ b/test_ludochaordic.sh @@ -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/