forked from internetarchive/openlibrary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (48 loc) · 1.54 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
47
48
os: linux
dist: focal
language: python
jobs:
include:
- name: “Python 2.7 on xenial”
python: "2.7"
dist: xenial
- name: “Python 2.7 on focal”
python: "2.7"
- name: “Python 2.7 on Infogami master”
python: "2.7"
script:
- make i18n
- make test
- pip install safety
- safety check || true
- name: “Python 3.8 make lint and selected pytests”
python: "3.8"
before_script: true # override npm install below
script:
# On pull requests, run all flake8 tests on modified code
# if clause avoids `fatal: ambiguous argument 'origin/master'` on git push
- if [ "$TRAVIS_EVENT_TYPE" == "pull_request" ]; then
make lint-diff;
fi
- source scripts/test-py3.sh
- name: “Python 3.8 on focal”
python: "3.8"
allow_failures:
- name: “Python 2.7 on Infogami master”
- name: “Python 3.8 on focal”
# Ubuntu may have an old version of node, so make sure Node 12 is installed
# and used instead. Should match Dockerfile.
before_install:
- nvm install 12
- nvm use 12
install:
- pip install -r requirements_test.txt
# refresh the git submodule ./vendor/infogami on some jobs
- if [ "$TRAVIS_PYTHON_VERSION" == "3.8" ] || [ "$TRAVIS_JOB_NAME" == "Python 2.7 on Infogami master" ]; then
pushd vendor/infogami && git pull origin master && popd;
fi
- make lint # TODO: Move this to script: section after #2951 lands
before_script: npm install
script:
- make i18n
- make test