github.com/turingchain2020/turingchain@v1.1.21/.gitlab-ci.yml (about)

     1  #image: turingchain-build:latest
     2  
     3  before_script:
     4      - export GO_PROJECT_NAMESPACE="$GOPATH/src/gitlab.__officeSite__/$CI_PROJECT_NAMESPACE"
     5      - echo $GO_PROJECT_NAMESPACE
     6      - mkdir -p $GO_PROJECT_NAMESPACE
     7      - ln -srf $(pwd) $GO_PROJECT_NAMESPACE
     8      - export GO_PROJECT_PATH="$GO_PROJECT_NAMESPACE/$CI_PROJECT_NAME"
     9      - echo $GO_PROJECT_PATH
    10      - cd $GO_PROJECT_PATH
    11      - make clean
    12  
    13  after_script:
    14      - make clean
    15  
    16  stages:
    17      - build
    18      - test
    19      - deploy
    20      - fork_test
    21      - autotest
    22  
    23  go_fmt:
    24      stage: build
    25      tags:
    26          - turingchain2020
    27      script:
    28          - make checkgofmt
    29          - make fmt
    30      only:
    31          - master
    32          - trc_develop
    33  
    34  go_lint:
    35      stage: build
    36      tags:
    37          - turingchain2020
    38      script:
    39          - make linter
    40      only:
    41          - master
    42          - trc_develop
    43  
    44  go_test:
    45      stage: test
    46      tags:
    47          - turingchain2020
    48      script:
    49          - make docker-compose-down DAPP=all
    50          - make test
    51      only:
    52          - master
    53          - trc_develop
    54  
    55  #memory_sanitizer:
    56  #    stage: test
    57  #    script:
    58  #        - export CC=clang-5.0 && make msan
    59  #    only:
    60  #        - master
    61  #        - develop
    62  #        - trc_develop
    63  
    64  code_coverage:
    65      stage: test
    66      script:
    67          - make coverage
    68      only:
    69          - master
    70          - trc_develop
    71  
    72  #code_coverage_report:
    73  #    stage: test
    74  #    script:
    75  #        - make coverhtml
    76  #    only:
    77  #        - master
    78  #        - develop
    79  #        - trc_develop
    80  
    81  deploy:
    82      stage: deploy
    83      tags:
    84          - turingchain2020
    85      script:
    86          - make build_ci
    87          - make docker-compose
    88          - make docker-compose-down
    89      only:
    90          - master
    91          - trc_develop
    92  
    93  deploy_relay:
    94      stage: deploy
    95      tags:
    96          - turingchain2020
    97      script:
    98          - make build_ci
    99          - make docker-compose PROJ=relay DAPP=relay
   100          - make docker-compose-down PROJ=relay DAPP=relay
   101      only:
   102          - master
   103  
   104  deploy_paracross:
   105      stage: deploy
   106      tags:
   107          - turingchain2020
   108      script:
   109          - make build_ci
   110          - make docker-compose PROJ=paracross DAPP=paracross
   111          - make docker-compose-down PROJ=paracross DAPP=paracross
   112      only:
   113          - master
   114  
   115  fork_test:
   116      stage: fork_test
   117      tags:
   118          - turingchain2020
   119      script:
   120           - if [ -n "${onceEveryday}" ]; then
   121           - make build_ci
   122           - make fork-test
   123           - make docker-compose-down
   124           - fi
   125      only:
   126          - master
   127          - forkTest
   128  
   129  fork_test_privacy:
   130      stage: fork_test
   131      tags:
   132          - turingchain2020
   133      script:
   134           - if [ -n "${onceEveryday}" ]; then
   135           - make build_ci
   136           - make fork-test PROJ=privacy DAPP=privacy
   137           - make docker-compose-down PROJ=privacy DAPP=privacy
   138           - fi
   139      only:
   140          - master
   141          - forkTest
   142  
   143  fork_test_paracross:
   144      stage: fork_test
   145      tags:
   146          - turingchain2020
   147      script:
   148           - if [ -n "${onceEveryday}" ]; then
   149           - make build_ci
   150           - make fork-test PROJ=paracross DAPP=paracross
   151           - make docker-compose-down PROJ=paracross DAPP=paracross
   152           - fi
   153      only:
   154          - master
   155          - forkTest
   156  
   157  ##serial run all dapp
   158  fork_test_all:
   159      stage: fork_test
   160      tags:
   161          - turingchain2020
   162      script:
   163           - if [ -n "${onceEveryday}" ]; then
   164           - make build_ci
   165           - make fork-test PROJ=fork DAPP=all
   166           - make docker-compose-down PROJ=fork DAPP=all
   167           - fi
   168      only:
   169          - master
   170          - forkTest
   171  
   172  ##serial run all dapp
   173  deploy_test_all:
   174      stage: fork_test
   175      tags:
   176          - turingchain2020
   177      script:
   178           - if [ -n "${onceEveryday}" ]; then
   179           - make build_ci
   180           - make docker-compose PROJ=deploy DAPP=all
   181           - make docker-compose-down PROJ=deploy DAPP=all
   182           - fi
   183      only:
   184          - master
   185          - forkTest
   186  
   187  
   188  autotest:
   189      stage: autotest
   190      tags:
   191          - turingchain2020
   192      script:
   193          - if [ -n "${onceEveryday}" ]; then
   194          - make build_ci
   195          - make autotest
   196          - cd build/autotest && ./copy-autotest.sh gitlabci && cd gitlabci && ./gitlabci-autotest.sh build
   197          - cd $GO_PROJECT_PATH
   198          - fi
   199      when: always
   200      only:
   201          - master
   202