##// END OF EJS Templates
Merge pull request #12545 from minrk/darker-feedback...
Matthias Bussonnier -
r26005:cccaab9a merge
parent child Browse files
Show More
@@ -1,128 +1,138 b''
1 # http://travis-ci.org/#!/ipython/ipython
1 # http://travis-ci.org/#!/ipython/ipython
2 language: python
2 language: python
3 os: linux
3 os: linux
4
4
5 addons:
5 addons:
6 apt:
6 apt:
7 packages:
7 packages:
8 - graphviz
8 - graphviz
9
9
10 python:
10 python:
11 - 3.6
11 - 3.6
12
12
13 env:
13 env:
14 global:
14 global:
15 - PATH=$TRAVIS_BUILD_DIR/pandoc:$PATH
15 - PATH=$TRAVIS_BUILD_DIR/pandoc:$PATH
16
16
17 group: edge
17 group: edge
18
18
19 before_install:
19 before_install:
20 - |
20 - |
21 # install Python on macOS
21 # install Python on macOS
22 if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
22 if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
23 env | sort
23 env | sort
24 if ! which python$TRAVIS_PYTHON_VERSION; then
24 if ! which python$TRAVIS_PYTHON_VERSION; then
25 HOMEBREW_NO_AUTO_UPDATE=1 brew tap minrk/homebrew-python-frameworks
25 HOMEBREW_NO_AUTO_UPDATE=1 brew tap minrk/homebrew-python-frameworks
26 HOMEBREW_NO_AUTO_UPDATE=1 brew cask install python-framework-${TRAVIS_PYTHON_VERSION/./}
26 HOMEBREW_NO_AUTO_UPDATE=1 brew cask install python-framework-${TRAVIS_PYTHON_VERSION/./}
27 fi
27 fi
28 python3 -m pip install virtualenv
28 python3 -m pip install virtualenv
29 python3 -m virtualenv -p $(which python$TRAVIS_PYTHON_VERSION) ~/travis-env
29 python3 -m virtualenv -p $(which python$TRAVIS_PYTHON_VERSION) ~/travis-env
30 source ~/travis-env/bin/activate
30 source ~/travis-env/bin/activate
31 fi
31 fi
32 - python --version
32 - python --version
33
33
34 install:
34 install:
35 - pip install pip --upgrade
35 - pip install pip --upgrade
36 - pip install setuptools --upgrade
36 - pip install setuptools --upgrade
37 - if [[ "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then
37 - if [[ "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then
38 echo "for the time being still test on 3.6";
38 echo "for the time being still test on 3.6";
39 sed -ibkp s/7/6/g setup.py;
39 sed -ibkp s/7/6/g setup.py;
40 git diff;
40 git diff;
41 fi
41 fi
42 - pip install -e file://$PWD#egg=ipython[test] --upgrade
42 - pip install -e file://$PWD#egg=ipython[test] --upgrade
43 - pip install trio curio --upgrade --upgrade-strategy eager
43 - pip install trio curio --upgrade --upgrade-strategy eager
44 - pip install 'pytest<6' 'matplotlib !=3.2.0' mypy
44 - pip install 'pytest<6' 'matplotlib !=3.2.0' mypy
45 - pip install codecov check-manifest --upgrade
45 - pip install codecov check-manifest --upgrade
46 - pip install mypy darker
46 - pip install mypy darker
47 - |
47 - |
48 if [[ "$MASTER_DEPENDENCIES" == "True" ]]; then
48 if [[ "$MASTER_DEPENDENCIES" == "True" ]]; then
49 pip install git+https://github.com/ipython/traitlets#egg=traitlets --force
49 pip install git+https://github.com/ipython/traitlets#egg=traitlets --force
50 fi
50 fi
51
51
52
52
53 script:
53 script:
54 - check-manifest
54 - check-manifest
55 - |
55 - |
56 if [[ "$TRAVIS_PYTHON_VERSION" == "nightly" ]]; then
56 if [[ "$TRAVIS_PYTHON_VERSION" == "nightly" ]]; then
57 # on nightly fake parso known the grammar
57 # on nightly fake parso known the grammar
58 cp /home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/parso/python/grammar38.txt /home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/parso/python/grammar39.txt
58 cp /home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/parso/python/grammar38.txt /home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/parso/python/grammar39.txt
59 fi
59 fi
60 - |
61 # check style on changes
62 # run `darker -r master` and commit changes to fix
63 if [[ "${TRAVIS_PULL_REQUEST:-false}" != "false" ]] \
64 && [[ "$TRAVIS_PYTHON_VERSION" == "3.8" ]] \
65 && [[ "$TRAVIS_OS_NAME" == "linux" ]];
66 then
67 darker -r ${TRAVIS_COMMIT_RANGE%%.*} --check --diff . || (
68 echo "Changes need auto-formatting. Run:"
69 echo " darker -r ${TRAVIS_COMMIT_RANGE%%.*}"
70 echo "then commit and push changes to fix."
71 exit 1
72 )
73 fi
60 - cd /tmp && iptest --coverage xml && cd -
74 - cd /tmp && iptest --coverage xml && cd -
61 - pytest IPython
75 - pytest IPython
62 - mypy IPython/terminal/ptutils.py
76 - mypy IPython/terminal/ptutils.py
63 - mypy IPython/core/c*.py
77 - mypy IPython/core/c*.py
64 - |
65 if [[ "$TRAVIS_PYTHON_VERSION" == "3.8" ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
66 darker -r 60625f241f298b5039cb2debc365db38aa7bb522 --check --diff .
67 fi
68 # On the latest Python (on Linux) only, make sure that the docs build.
78 # On the latest Python (on Linux) only, make sure that the docs build.
69 - |
79 - |
70 if [[ "$TRAVIS_PYTHON_VERSION" == "3.7" ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
80 if [[ "$TRAVIS_PYTHON_VERSION" == "3.7" ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
71 pip install -r docs/requirements.txt
81 pip install -r docs/requirements.txt
72 python tools/fixup_whats_new_pr.py
82 python tools/fixup_whats_new_pr.py
73 make -C docs/ html SPHINXOPTS="-W"
83 make -C docs/ html SPHINXOPTS="-W"
74 fi
84 fi
75
85
76 after_success:
86 after_success:
77 - cp /tmp/ipy_coverage.xml ./
87 - cp /tmp/ipy_coverage.xml ./
78 - cp /tmp/.coverage ./
88 - cp /tmp/.coverage ./
79 - codecov
89 - codecov
80
90
81 matrix:
91 matrix:
82 include:
92 include:
83 - arch: amd64
93 - arch: amd64
84 python: "3.6"
94 python: "3.6"
85 dist: xenial
95 dist: xenial
86 - arch: amd64
96 - arch: amd64
87 python: "3.7"
97 python: "3.7"
88 dist: xenial
98 dist: xenial
89 - arch: amd64
99 - arch: amd64
90 python: "3.8"
100 python: "3.8"
91 dist: xenial
101 dist: xenial
92 - arch: amd64
102 - arch: amd64
93 python: "nightly"
103 python: "nightly"
94 dist: xenial
104 dist: xenial
95 - arch: amd64
105 - arch: amd64
96 python: "3.9-dev"
106 python: "3.9-dev"
97 - os: osx
107 - os: osx
98 language: generic
108 language: generic
99 python: 3.6
109 python: 3.6
100 env: TRAVIS_PYTHON_VERSION=3.6
110 env: TRAVIS_PYTHON_VERSION=3.6
101 - os: osx
111 - os: osx
102 language: generic
112 language: generic
103 python: 3.7
113 python: 3.7
104 env: TRAVIS_PYTHON_VERSION=3.7
114 env: TRAVIS_PYTHON_VERSION=3.7
105 - arch: amd64
115 - arch: amd64
106 python: "3.8"
116 python: "3.8"
107 env: MASTER_DEPENDENCIES=True
117 env: MASTER_DEPENDENCIES=True
108 allow_failures:
118 allow_failures:
109 - python: nightly
119 - python: nightly
110
120
111 before_deploy:
121 before_deploy:
112 - rm -rf dist/
122 - rm -rf dist/
113 - python setup.py sdist
123 - python setup.py sdist
114 - python setup.py bdist_wheel
124 - python setup.py bdist_wheel
115
125
116 deploy:
126 deploy:
117 provider: releases
127 provider: releases
118 api_key:
128 api_key:
119 secure: Y/Ae9tYs5aoBU8bDjN2YrwGG6tCbezj/h3Lcmtx8HQavSbBgXnhnZVRb2snOKD7auqnqjfT/7QMm4ZyKvaOEgyggGktKqEKYHC8KOZ7yp8I5/UMDtk6j9TnXpSqqBxPiud4MDV76SfRYEQiaDoG4tGGvSfPJ9KcNjKrNvSyyxns=
129 secure: Y/Ae9tYs5aoBU8bDjN2YrwGG6tCbezj/h3Lcmtx8HQavSbBgXnhnZVRb2snOKD7auqnqjfT/7QMm4ZyKvaOEgyggGktKqEKYHC8KOZ7yp8I5/UMDtk6j9TnXpSqqBxPiud4MDV76SfRYEQiaDoG4tGGvSfPJ9KcNjKrNvSyyxns=
120 file: dist/*
130 file: dist/*
121 file_glob: true
131 file_glob: true
122 cleanup: false
132 cleanup: false
123 on:
133 on:
124 repo: ipython/ipython
134 repo: ipython/ipython
125 all_branches: true # Backports are released from e.g. 5.x branch
135 all_branches: true # Backports are released from e.g. 5.x branch
126 tags: true
136 tags: true
127 python: 3.6 # Any version should work, but we only need one
137 python: 3.6 # Any version should work, but we only need one
128 condition: $TRAVIS_OS_NAME = "linux"
138 condition: $TRAVIS_OS_NAME = "linux"
General Comments 0
You need to be logged in to leave comments. Login now