forked from jupyterhub/ldapauthenticator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
59 lines (57 loc) · 1.21 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
49
50
51
52
53
54
55
56
57
58
59
dist: xenial
language: python
sudo: false
cache:
- pip
python:
- 3.7
- 3.6
env:
global:
- ASYNC_TEST_TIMEOUT=15
- LDAP_HOST=127.0.0.1
services:
- docker
# installing dependencies
before_install:
- set -e
install:
- pip install --upgrade pip
- pip install --upgrade --pre -r dev-requirements.txt .
- pip freeze
- |
# start LDAP server
if [[ -z "$TEST" ]]; then
ci/docker-ldap.sh
fi
# running tests
script:
- |
# run tests
if [[ -z "$TEST" ]]; then
pytest -v --maxfail=2 --cov=ldapauthenticator ldapauthenticator/tests
fi
- |
# run autoformat
if [[ "$TEST" == "lint" ]]; then
pre-commit run --all-files
fi
after_success:
- codecov
after_failure:
- |
# point to auto-lint-fix
if [[ "$TEST" == "lint" ]]; then
echo "You can install pre-commit hooks to automatically run formatting"
echo "on each commit with:"
echo " pre-commit install"
echo "or you can run by hand on staged files with"
echo " pre-commit run"
echo "or after-the-fact on already committed files with"
echo " pre-commit run --all-files"
fi
matrix:
fast_finish: true
include:
- python: 3.6
env: TEST=lint