blob: 930afeceb72e0140a1f123627d201ee40c2a5410 (
plain) (
blame)
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
|
image: ruby:2.7
stages:
- build
- test
- lint
- release
variables:
BUNDLE_PATH: .bundle/vendor
cache: &cache
policy: pull-push
key:
files:
- Gemfile.lock
paths:
- CLI/ruby/.bundle/vendor
before_script:
- cd CLI/ruby
- bundle install -j $(nproc)
build:
stage: build
script:
- ruby -v
- bundle env
test:
stage: test
needs: [build]
cache:
<<: *cache
policy: pull
script:
- bundle exec rspec
lint:
stage: test
needs: [build]
cache:
<<: *cache
policy: pull
script:
- bundle exec rubocop
release:
stage: release
needs: [test, lint]
rules:
- if: $CI_COMMIT_TAG =~ /^ruby\/v.*$/
cache:
<<: *cache
policy: pull
script:
- bundle exec rake clean
- bundle exec rake clobber
- bundle exec rake build
- bundle exec gem push pkg/terminal_game_of_life-*.gem
|