summaryrefslogtreecommitdiff
path: root/.gitlab/test.yml
blob: 349b1f011677689efe570902bb10f10362575437 (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
lint:
  stage: test
  image: ruby:alpine
  script:
    - apk add build-base shellcheck
    - bin/setup
    - bin/lint

.rspec:
  stage: test
  script:
    - cd /opt/spandx-gitlab
    - ./bin/bootstrap
    - ./bin/test $RSPEC_DIR --format RspecJunitFormatter --out rspec.xml
  variables:
    BUNDLE_JOBS: '2'
    BUNDLE_PATH: 'vendor/bundle'
    GIT_DEPTH: "1"
    GIT_STRATEGY: fetch
  cache:
    key: ${CI_COMMIT_REF_SLUG}
    paths:
      - vendor
  artifacts:
    paths:
      - rspec.xml
    reports:
      junit: rspec.xml

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

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