-
Notifications
You must be signed in to change notification settings - Fork 136
/
.gitlab-ci.yml
55 lines (50 loc) · 1.1 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
---
stages:
- lint
- test
- installation-tests
variables:
RUBY_VERSION: "2.7"
RUBY_IMAGE: "ruby:${RUBY_VERSION}"
PUPPET_VERSION: "7.0"
.common:
image: ${RUBY_IMAGE}
cache:
key: $CI_COMMIT_REF_SLUG
paths:
- vendor/ruby
before_script:
- bundle config set --local path 'vendor/ruby'
- bundle install -j $(nproc)
lint:
extends: .common
stage: lint
script:
- bundle exec rubocop --format junit --out rubocop.xml --display-only-fail-level-offenses --fail-level=A
artifacts:
when: always
paths:
- rubocop.xml
reports:
junit: rubocop.xml
test:
extends: .common
stage: test
script:
- bundle exec rspec --format RspecJunitFormatter --out rspec.xml
artifacts:
when: always
paths:
- rspec.xml
reports:
junit: rspec.xml
installation-tests:
extends: .common
stage: installation-tests
variables:
PREFIX: "${RUBY_VERSION}"
script:
- apt update && apt install -y asciidoc-base docbook-xsl --no-install-recommends
- bundle exec rake install --trace
- bundle exec rake installation_tests --trace
...