Mordil/RediStack

View on GitHub
.gitlab/ci/main.yml

Summary

Maintainability
Test Coverage
include: '/.gitlab/ci/platform-test.yml'

stages:
  - Platform Tests
  - Quality Checks

Code Climate:
  only:
    - branches
    - tags
  except:
    - schedules
  stage: Quality Checks
  image: docker:stable
  services:
    - docker:stable-dind
  variables:
    DOCKER_DRIVER: overlay2
    CODE_QUALITY_IMAGE: "registry.gitlab.com/gitlab-org/security-products/codequality:latest"
  script:
    - docker pull --quiet "$CODE_QUALITY_IMAGE"
    - docker run
        --env SOURCE_CODE="$PWD"
        --volume "$PWD":/code
        --volume /var/run/docker.sock:/var/run/docker.sock
        "$CODE_QUALITY_IMAGE" /code
  artifacts:
    expire_in: 1 week
    reports:
      codequality: gl-code-quality-report.json

Code Coverage:
  extends: .platform-test
  stage: Quality Checks
  allow_failure: false
  image: swift:latest
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
      changes:
        - '*.swift'
  script: scripts/generate_code_coverage.sh
  coverage: '/TOTAL.*(\s\d+\.\d+%)/'

.standard-platform-test:
  rules:
    - if: $CI_PIPELINE_SOURCE == "push"
  stage: Platform Tests
  trigger:
    strategy: depend
    include: '/.gitlab/ci/standard-platforms.yml'

Ubuntu Xenial:
  extends: .standard-platform-test
  variables:
    SWIFT_PLATFORM_NAME: xenial
  trigger:
    include: '/.gitlab/ci/eol-platforms-5.5.yml'

Ubuntu Bionic:
  extends: .standard-platform-test
  variables:
    SWIFT_PLATFORM_NAME: bionic

Ubuntu Focal:
  extends: .standard-platform-test
  variables:
    SWIFT_PLATFORM_NAME: focal

CentOS 7:
  extends: .standard-platform-test
  trigger:
    include: '/.gitlab/ci/centos-7.yml'

CentOS 8:
  extends: .standard-platform-test
  variables:
    SWIFT_PLATFORM_NAME: centos8
  trigger:
    include: '/.gitlab/ci/eol-platforms-5.5.yml'

Amazon Linux 2:
  extends: .standard-platform-test
  variables:
    SWIFT_PLATFORM_NAME: amazonlinux2