-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
73 lines (65 loc) · 1.41 KB
/
.gitlab-ci.yml
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
image: ruby:2.7.4
stages:
- lint
- test
- analysis
cache:
paths:
- vendor/ruby
.install_ruby_gems: &install_ruby_gems
- gem install bundler -v 2.2.26
- bundle install --path vendor
before_script:
- *install_ruby_gems
rubocop:
stage: lint
script:
- bundle exec rubocop --format progress --format json --out rubocop.json
artifacts:
paths:
- rubocop.json
except:
- schedules
bundler-audit:
stage: lint
before_script:
- *install_ruby_gems
- gem install bundler-audit
- bundle audit --update
script:
- bundle audit
allow_failure: true
rspec:
stage: test
script:
- bundle exec rspec --format progress --format RspecJunitFormatter --out rspec.xml
artifacts:
paths:
- rspec.xml
- coverage
reports:
junit: rspec.xml
except:
- schedules
sonarqube:
stage: analysis
image:
name: sonarsource/sonar-scanner-cli
entrypoint: [""]
variables:
GIT_DEPTH: 0
before_script: []
script:
- sonar-scanner
-Dsonar.projectKey=Bankai
-Dsonar.sourceEncoding=UTF-8
-Dsonar.qualitygate.wait=true
-Dsonar.ruby.rubocop.reportPaths=rubocop.json
-Dsonar.ruby.coverage.reportPaths=coverage/.resultset.json
-Dsonar.exclusions=vendor/ruby/**/*
-Dsonar.coverage.exclusions=spec/**/*
-Dsonar.projectVersion=$CI_COMMIT_SHORT_SHA
-Dsonar.sources=.
allow_failure: true
only:
- master