github.com/RedHatInsights/insights-content-service@v1.0.0/.travis.yml (about)

     1  # Copyright 2020 Red Hat, Inc
     2  #
     3  # Licensed under the Apache License, Version 2.0 (the "License");
     4  # you may not use this file except in compliance with the License.
     5  # You may obtain a copy of the License at
     6  #
     7  #      http://www.apache.org/licenses/LICENSE-2.0
     8  #
     9  # Unless required by applicable law or agreed to in writing, software
    10  # distributed under the License is distributed on an "AS IS" BASIS,
    11  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  # See the License for the specific language governing permissions and
    13  # limitations under the License.
    14  
    15  language: go
    16  go:
    17  - "1.17"
    18  
    19  jobs:
    20    include:
    21      - stage: style
    22        script:
    23          - make style
    24      - stage: unit tests
    25        script:
    26          - make test
    27          - ./check_coverage.sh
    28          - make coverage
    29        after_success:
    30          - env
    31          - bash <(curl -s https://codecov.io/bash)
    32      - stage: openapi-checks
    33        language: node_js
    34        node_js:
    35          - 17
    36          - node
    37        script:
    38          - npm install -g @openapitools/openapi-generator-cli
    39          - openapi-generator-cli validate -i openapi.json
    40      - stage: bdd tests
    41        services:
    42          - docker
    43        before_script:
    44          - ./build.sh --test-rules-only
    45          - cid=$(docker run -itd quay.io/cloudservices/insights-behavioral-spec:latest sh -c "sleep infinity")
    46          - docker cp $PWD $cid:`docker exec $cid bash -c 'echo "$HOME"'`
    47        script:
    48          - docker exec -it $cid /bin/bash -c 'env && make insights-content-service-tests'
    49      - stage: integration tests
    50        script:
    51          - make integration_tests
    52  
    53  stages:
    54    - style
    55    - unit tests
    56    - openapi-checks
    57    - bdd tests
    58    - integration tests