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



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