This repository has been archived by the owner on Jul 8, 2021. It is now read-only.
forked from cylc/cylc-flow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
130 lines (118 loc) · 3.71 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# Configuration for the Travis continuous integration system
# ==========================================================
#
# Travis is a free service for running automatic tests on Github repositories.
# This file configures Travis for Cylc, telling it how to install Cylc and run
# the test battery.
#
# Test results get posted back to Github. By default Travis will run tests on any
# pull requests, adding a comment on the pull request page to say if the tests
# pass or fail, it will also test any new commits, showing the test results on
# the branch page, e.g. https://github.com/cylc/cylc-flow/branches.
#
# Connecting a Cylc branch
# ------------------------
#
# To make use of Travis you will first need to create a fork of Cylc in Github.
# Log in to https://travis-ci.org using your Github credentials, it will ask for
# permission to see your repositories, set the status of branches (whether the
# build passes or fails tests) and create hooks so Travis gets notified of new
# commits.
#
# Travis will create a list of all of your public Github repositories, you can
# enable automatic tests for a repository using the switches in this list.
#
# More information for Travis can be found at http://docs.travis-ci.com/user/getting-started/
---
cache: pip
dist: xenial
addons:
apt:
update: true # instruct travis-ci to always run apt before each build
language: python
stages:
- unit-test
- functional-test
- sensitive-test
env:
global:
- PATH="${TRAVIS_BUILD_DIR}/bin:$PATH"
# Only run the generic tests on Travis CI.
- CYLC_TEST_RUN_PLATFORM=false
# Custom diff command to ignore Xlib errors (xvfb has not RANDR extension).
- CYLC_TEST_DIFF_CMD="diff -I Xlib -u"
# This coverage RC file is created under the script task
- COVERAGE_PROCESS_START="/tmp/.coveragerc"
unittest: &unittest
stage: unit-test
install:
- .travis/install.sh unit-tests
script:
- pycodestyle
- .travis/shellchecker
- pytest --cov-append --cov=cylc/flow
after_success:
# Report metrics, such as coverage
- coverage combine --append
- coverage xml --ignore-errors
- bash <(curl -s https://codecov.io/bash)
regressiontest: ®ressiontest
stage: functional-test
python:
- "3.7"
install:
- .travis/install.sh functional-tests
script:
- export PYTHONPATH="${TRAVIS_BUILD_DIR}/.travis"
- .travis/coverage-data.sh
- coverage run .travis/cover.py
- unset PYTHONPATH
after_failure:
- .travis/after_failure.sh
after_success:
# Report metrics, such as coverage
- coverage combine --append
- coverage xml --ignore-errors
- bash <(curl -s https://codecov.io/bash)
flakytest: &flakytest
stage: sensitive-test
python:
- "3.7"
install:
- .travis/install.sh functional-tests
script:
- export PYTHONPATH="${TRAVIS_BUILD_DIR}/.travis"
- .travis/coverage-data.sh
- coverage run .travis/cover.py
- unset PYTHONPATH
after_failure:
- .travis/after_failure.sh
after_success:
# Report metrics, such as coverage
- coverage combine --append
- coverage xml --ignore-errors
- bash <(curl -s https://codecov.io/bash)
jobs:
include:
# run unittests at each supported Python version
- <<: *unittest
python: "3.7"
# run regression tests in chunks with the most contemporary
# supported Python version
- <<: *regressiontest
python: "3.7"
env: CHUNK="1/4"
- <<: *regressiontest
python: "3.7"
env: CHUNK="2/4"
- <<: *regressiontest
python: "3.7"
env: CHUNK="3/4"
- <<: *regressiontest
python: "3.7"
env: CHUNK="4/4"
- <<: *flakytest
python: "3.7"
env: FLAKYTESTS="./flakytests"
# TODO: run shortlist of regression tests with the
# least contemporary Python version