forked from pupil-labs/pupil
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
36 lines (33 loc) · 1.26 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
# Travis integration for running unittests on pupil-labs/pupil
# NOTE: Tests are currently only ran on Ubuntu 18.04
# There's a docker image pupillabs/pupil-docker-ubuntu:latest which contains all
# required dependencies for the test-suite to run.
jobs:
include:
- name: pytest
os: minimal
services: docker
before_install:
- docker pull pupillabs/pupil-docker-ubuntu:latest
- chmod +x ./.travis/*.sh
script:
- >
docker run --rm
-v `pwd`:/repo
-w /repo
pupillabs/pupil-docker-ubuntu:latest
/bin/bash /repo/.travis/run_tests.sh
- name: black formatting check
language: python
before_install: pip install -U pip
# Travis automatically runs `pip install -r requirements.txt` if such a file is present.
# Source: https://docs.travis-ci.com/user/languages/python/#dependency-management
# Since we only need black to be installed, we overwrite with:
install: pip install black
script:
- >
black . --check --exclude pupil_src/tests || (
echo -e "\033[0;31m PLEASE RUN THE BLACK FORMATTER ON YOUR CODE: \033[0m" &&
echo "See https://github.com/psf/black for details" &&
false
)