[Notes] [Git][BuildGrid/buildgrid][mablanch/00-update-fix-ci] Fix CI coverage report combination and generation



Title: GitLab

Martin Blanchard pushed to branch mablanch/00-update-fix-ci at BuildGrid / buildgrid

Commits:

1 changed file:

Changes:

  • .gitlab-ci.yml
    ... ... @@ -7,6 +7,8 @@ variables:
    7 7
     stages:
    
    8 8
       - test
    
    9 9
       - post
    
    10
    +  - deploy
    
    11
    +
    
    10 12
     
    
    11 13
     before_script:
    
    12 14
       - python3 -m pip install --upgrade setuptools pip
    
    ... ... @@ -33,6 +35,8 @@ before_script:
    33 35
         - ${BGD} bot dummy &
    
    34 36
         - ${BGD} execute request-dummy --wait-for-completion
    
    35 37
     
    
    38
    +# Test stage, build and test the code.
    
    39
    +#
    
    36 40
     tests-debian-stretch:
    
    37 41
       <<: *linux-tests
    
    38 42
     
    
    ... ... @@ -40,8 +44,13 @@ run-dummy-job-debian:
    40 44
       image: buildstream/buildstream-debian
    
    41 45
       <<: *dummy-job
    
    42 46
     
    
    43
    -build-docs:
    
    44
    -  stage: test
    
    47
    +
    
    48
    +# Post-build stage, documentation, coverage report...
    
    49
    +#
    
    50
    +documentation:
    
    51
    +  stage: post
    
    52
    +  dependencies:
    
    53
    +  - tests-debian-stretch
    
    45 54
       script:
    
    46 55
         - python3 -m pip install --user --editable ".[docs]"
    
    47 56
         - make -C docs html
    
    ... ... @@ -51,33 +60,33 @@ build-docs:
    51 60
         paths:
    
    52 61
         - documentation/
    
    53 62
     
    
    54
    -
    
    55 63
     coverage:
    
    56 64
       stage: post
    
    65
    +  dependencies:
    
    66
    +  - tests-debian-stretch
    
    57 67
       coverage: '/TOTAL +\d+ +\d+ +(\d+\.\d+)%/'
    
    58 68
       script:
    
    59 69
         - python3 -m pip install --user --editable ".[tests]"
    
    60
    -    - mkdir report
    
    61
    -    - cd report
    
    62
    -    - cp ../coverage/coverage.* .
    
    63
    -    - ls coverage.*
    
    64
    -    - coverage combine --rcfile=../.coveragerc -a coverage.*
    
    65
    -    - coverage report --rcfile=../.coveragerc -m
    
    66
    -  dependencies:
    
    67
    -  - tests-debian-stretch
    
    70
    +    - cd coverage/
    
    71
    +    - ls -l .
    
    72
    +    - python3 -m coverage combine --rcfile=../.coveragerc --append coverage.*
    
    73
    +    - python3 -m coverage html --rcfile=../.coveragerc --directory coverage/
    
    74
    +    - python3 -m coverage report --rcfile=../.coveragerc --show-missing
    
    75
    +    - python3 -m coverage erase --rcfile=../.coveragerc
    
    76
    +  artifacts:
    
    77
    +    paths:
    
    78
    +    - coverage/
    
    68 79
     
    
    69
    -# Deploy, only for merges which land on master branch.
    
    80
    +# Deployement stage, only for merges which land on master branch.
    
    70 81
     #
    
    71 82
     pages:
    
    72
    -  stage: post
    
    83
    +  stage: deploy
    
    73 84
       dependencies:
    
    74
    -  - tests-debian-stretch
    
    75
    -  - build-docs
    
    85
    +  - coverage
    
    86
    +  - documentation
    
    76 87
       script:
    
    77 88
       - cp -a coverage/* public/
    
    78 89
       - cp -a documentation/* public/
    
    79 90
       artifacts:
    
    80 91
         paths:
    
    81 92
         - public/
    82
    -  only:
    
    83
    -  - master



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]