forked from the-turing-way/the-turing-way
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
47 lines (41 loc) · 2.03 KB
/
.travis.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
env:
matrix:
CAN_FAIL_VAR=false # the default setting for builds in the matrix is that they are not allowed to fail
matrix:
include:
# refer to https://docs.travis-ci.com/user/languages/minimal-and-generic/#generic
# for the rationale behind choosing the generic lang
- language: generic
dist: xenial # ubuntu 16.04
cache: bundler
before_install: # get a reasonably new version of python3 and pip
- sudo apt-get install python3-pip
- sudo -H pip3 install --upgrade pip
- sudo apt-get install python3-setuptools
install:
- pip3 install --user -r ./book/website/requirements.txt # install things for the book
- pip3 install --user -U attrs pytest # the installed versions in Travis are too old!
script:
# Below here, "scripts" directory refers to the one in book/website:
- cd ./book/website
- make install # install jekyll etc. for building website
- bash ./scripts/html-proof.sh # check dead links etc.
- language: python
python: 3.6
script:
- bash ./scripts/test-file-size.sh # test that we haven't accidentally included any big files
- python3 ./scripts/lorem-ipsums.py # check for rogue "lorem ipsum"s
- language: generic
env: CAN_FAIL_VAR=true # this test is allowed to fail
install:
- npm install --global prettier # add support for prettier.io
script:
- prettier --check ./book/content/**/*.md # check for markdown auto-formatting clashes
- language: python
python: 3.6
env: CAN_FAIL_VAR=true # this test is allowed to fail
script:
- prettier --check --prose-wrap preserve ./book/content/**/*.md # check for markdown auto-formatting clashes
- python3 ./scripts/no-bad-latin.py $CAN_FAIL_VAR # checks for latin abbreviations (we don't like because inaccessible) - is allowed to fail.
allow_failures:
- env: CAN_FAIL_VAR=true # tests with this env variable *exactly* are allowed to fail