File: .travis.yml

package info (click to toggle)
cylc 8.0~a2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 10,208 kB
  • sloc: python: 39,459; sh: 13,200; xml: 157; javascript: 78; lisp: 54; perl: 16; makefile: 12
file content (117 lines) | stat: -rw-r--r-- 3,444 bytes parent folder | download
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
# 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/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-get before each build

language: python

stages:
- unit-test
- functional-test
- documentation

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:
    - export PYTHONPATH=$(pwd -P)/lib/
    - pycodestyle
    - pytest --cov-append --cov=lib/cylc --cov=lib/parsec
  after_success:
    # Report metrics, such as coverage
    - coverage combine --append
    - coverage xml --ignore-errors
    - bash <(curl -s https://codecov.io/bash)

regressiontest: &regressiontest
  stage: functional-test
  python:
    - "3.7"
  install:
    - .travis/install.sh functional-tests docs
  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.6"
  - <<: *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"

  # TODO: run shortlist of regression tests with the
  #       least contemporary Python version

  # build documentation
  - stage: documentation
    python: "3.7"
    install:
      - .travis/install.sh docs
    script:
      - cylc make-docs