.gitlab-ci.yml 1.25 KB
Newer Older
Gregory Ashton's avatar
Gregory Ashton committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# This script is an edited version of the example found at
# https://git.ligo.org/lscsoft/example-ci-project/blob/python/.gitlab-ci.yml
# Each 0th-indendation level is a job that will be run within GitLab CI
# The only exception are a short list of reserved keywords
#
# https://docs.gitlab.com/ee/ci/yaml/#gitlab-ci-yml

# stages is a reserved keyword that defines job dependencies and
# parallelization. each stage runs in parallel but must complete
# before the next stage begins

stages:
  - test
  - deploy

# test example on Debian 8 "jessie"
exitcode-jessie:
  stage: test
  image: ligo/software:jessie
  script:
21
    - pip install -r requirements.txt
Gregory Ashton's avatar
Gregory Ashton committed
22
23
    - pip install coverage
    - pip install coverage-badge
24
25
26
27
28
    - coverage erase
    - coverage run -a test/prior_tests.py
    - coverage run -a test/tests.py
    - coverage run -a test/waveform_generator_tests.py
    - coverage run -a test/noise_realisation_tests.py
29
    - coverage html --include=peyote/*
Gregory Ashton's avatar
Gregory Ashton committed
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
    - coverage-badge -o coverage.svg
  artifacts:
    paths:
      - htmlcov/
      - coverage.svg

pages:
  stage: deploy
  dependencies:
    - exitcode-jessie
  script:
    - mv htmlcov/ public/
    - mv coverage.svg public/
  artifacts:
    paths:
      - public
    expire_in: 30 days
  #only:
    #- master