summaryrefslogtreecommitdiff
path: root/.gitlab/test.yml
blob: 5f32fcd9b28b8687ba24c4ca0e6e6b2a6b5f87fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
size:
  image: docker:stable
  stage: test
  services:
    - docker:stable-dind
  tags: [gitlab-org-docker]
  timeout: 3 minutes
  variables:
    GIT_STRATEGY: none
    MAX_SIZE: 1567663064
  script:
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
    - docker pull $TMP_IMAGE
    - docker image ls $TMP_IMAGE
    - export CURRENT_SIZE=$(docker image inspect $TMP_IMAGE --format='{{.Size}}')
    - echo $MAX_SIZE
    - echo $CURRENT_SIZE
    - test "$MAX_SIZE" -gt "$CURRENT_SIZE"
  needs: ['build-docker-image']
  dependencies: []

lint:
  stage: test
  image: ruby:alpine
  script:
    - apk add bash build-base git shellcheck
    - bin/setup
    - bin/lint
  needs: []
  dependencies: []

.rspec:
  stage: test
  script:
    - ./bin/setup
    - ./bin/test $RSPEC_DIR --format RspecJunitFormatter --out rspec.xml
  variables:
    GIT_DEPTH: "10"
    GIT_STRATEGY: fetch
  cache:
    key: ${CI_COMMIT_REF_SLUG}
    paths:
      - vendor
  artifacts:
    expire_in: 1 week
    paths:
      - coverage/coverage.xml
      - rspec.xml
    expire_in: 1 week
    reports:
      cobertura: coverage/coverage.xml
      junit: rspec.xml
  needs: ['build-docker-image']
  dependencies: []

unit:
  extends: .rspec
  variables:
    RSPEC_DIR: spec/unit

integration-c:
  extends: .rspec
  variables:
    RSPEC_DIR: spec/integration/c
  needs:
    - build-docker-image
    - build-conan-pkg

integration-dotnet:
  extends: .rspec
  variables:
    RSPEC_DIR: spec/integration/dotnet
  needs: ['build-docker-image']

integration-go:
  extends: .rspec
  variables:
    RSPEC_DIR: spec/integration/go
  needs: ['build-docker-image']

integration-java-gradle:
  extends: .rspec
  variables:
    RSPEC_DIR: spec/integration/java/gradle_spec.rb
  needs:
    - build-docker-image

integration-java-maven:
  extends: .rspec
  variables:
    RSPEC_DIR: spec/integration/java/maven_spec.rb
  needs:
    - build-docker-image
    - build-mvn-pkg

integration-js:
  extends: .rspec
  variables:
    RSPEC_DIR: spec/integration/js
  needs: ['build-docker-image']

integration-php:
  extends: .rspec
  variables:
    RSPEC_DIR: spec/integration/php
  needs: ['build-docker-image']

integration-python:
  extends: .rspec
  variables:
    RSPEC_DIR: spec/integration/python
  needs: ['build-docker-image']

integration-ruby:
  extends: .rspec
  variables:
    RSPEC_DIR: spec/integration/ruby
  needs: ['build-docker-image']

integration-rust:
  extends: .rspec
  variables:
    RSPEC_DIR: spec/integration/rust
  needs: ['build-docker-image']