forked from mantidproject/mantidimaging
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
55 lines (46 loc) · 1.67 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
language: c
# Makes Travis clone the full repo so that the conda package can get the
# correct string from git describe and correctly label the package
git:
depth: false
dist: xenial
services:
- xvfb
- docker
env:
global:
- MINICONDA_DIR=$HOME/miniconda
- ENVIRONMENT_DIR=$HOME/envs
- ENVIRONMENT_NAME=test-environment
- DOCKER_RUN="docker run -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:ro -v $TRAVIS_BUILD_DIR:/opt/mantidimaging"
jobs:
- DOCKER_IMAGE="mantidproject/mantidimaging"
before_script:
- docker pull $DOCKER_IMAGE
- docker run $DOCKER_IMAGE conda list
- sudo mount -o remount,size=100% /run/shm
jobs:
fast_finish: true
allow_failures:
- env: DOCKER_IMAGE="mantidproject/mantidimaging:abseil"
include:
- stage: test
name: Test
script:
- $DOCKER_RUN -t $DOCKER_IMAGE yapf --parallel --diff --recursive .
- $DOCKER_RUN -t $DOCKER_IMAGE flake8
- $DOCKER_RUN -t $DOCKER_IMAGE mypy --ignore-missing-imports mantidimaging
- $DOCKER_RUN -t $DOCKER_IMAGE pytest
- stage: test
name: Test Abseil
# if: type = cron # disabled for testing in PR
env: DOCKER_IMAGE="mantidproject/mantidimaging:abseil"
script:
- $DOCKER_RUN $DOCKER_IMAGE yapf --parallel --diff --recursive .
- $DOCKER_RUN $DOCKER_IMAGE flake8
- $DOCKER_RUN $DOCKER_IMAGE mypy --ignore-missing-imports mantidimaging
- $DOCKER_RUN $DOCKER_IMAGE pytest
- stage: upload-nightly
if: type = cron
script:
- $DOCKER_RUN -e UPLOAD_USER -e ANACONDA_API_TOKEN -t $DOCKER_IMAGE /bin/bash -c "conda config --set anaconda_upload yes && make build-conda-package-nightly"