[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,13 @@ 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
    
    53
    +  dependencies:
    
    54
    +  - tests-debian-stretch
    
    45 55
       script:
    
    46 56
         - python3 -m pip install --user --editable ".[docs]"
    
    47 57
         - make -C docs html
    
    ... ... @@ -51,33 +61,35 @@ build-docs:
    51 61
         paths:
    
    52 62
         - documentation/
    
    53 63
     
    
    54
    -
    
    55 64
     coverage:
    
    56 65
       stage: post
    
    66
    +  dependencies:
    
    67
    +  - tests-debian-stretch
    
    57 68
       coverage: '/TOTAL +\d+ +\d+ +(\d+\.\d+)%/'
    
    58 69
       script:
    
    59 70
         - 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
    
    71
    +    - cd coverage/
    
    72
    +    - ls -l .
    
    73
    +    - python3 -m coverage combine --rcfile=../.coveragerc --append coverage.*
    
    74
    +    - python3 -m coverage html --rcfile=../.coveragerc --directory .
    
    75
    +    - python3 -m coverage report --rcfile=../.coveragerc --show-missing
    
    76
    +    - python3 -m coverage erase --rcfile=../.coveragerc
    
    77
    +  artifacts:
    
    78
    +    paths:
    
    79
    +    - coverage/
    
    68 80
     
    
    69
    -# Deploy, only for merges which land on master branch.
    
    81
    +# Deployement stage, only for merges which land on master branch.
    
    70 82
     #
    
    71 83
     pages:
    
    72
    -  stage: post
    
    84
    +  stage: deploy
    
    73 85
       dependencies:
    
    74
    -  - tests-debian-stretch
    
    75
    -  - build-docs
    
    86
    +  - coverage
    
    87
    +  - documentation
    
    76 88
       script:
    
    77
    -  - cp -a coverage/* public/
    
    89
    +  - mkdir -p public/coverage/
    
    90
    +  - cp -a coverage/* public/coverage/
    
    78 91
       - cp -a documentation/* public/
    
    92
    +  - ls -la public/
    
    79 93
       artifacts:
    
    80 94
         paths:
    
    81 95
         - public/
    82
    -  only:
    
    83
    -  - master



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