-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
51 lines (45 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
# Official language image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/ruby/tags/
image: "ruby:2.5.1"
# Cache gems in between builds
cache:
paths:
- vendor/ruby
# This is a basic example for a gem or script which doesn't use
# services such as redis or postgres
before_script:
- apt-get update >/dev/null
- apt-get install -y locales >/dev/null
- echo "en_US UTF-8" > /etc/locale.gen
- locale-gen en_US.UTF-8
- export LANG=en_US.UTF-8
- export LANGUAGE=en_US:en
- export LC_ALL=en_US.UTF-8
- ruby -v # Print out ruby version for debugging
- git config --global user.email "testuser@example.com"
- git config --global user.name "Test User"
# Uncomment next line if your rails app needs a JS runtime:
# - apt-get update -q && apt-get install nodejs -yqq
- gem install bundler --no-ri --no-rdoc # Bundler is not installed with the image
- cd cli
- bundle install -j $(nproc) --path vendor # Install dependencies into ./vendor/ruby
- cd ..
- cd sinatra
- bundle install -j $(nproc) --path vendor # Install dependencies into ./vendor/ruby
- cd ..
cli_rubocop:
script:
- cd cli
- bundle exec rake rubocop
cli_tests:
script:
- cd cli
- bundle exec rake test
sinatra_rubocop:
script:
- cd sinatra
- bundle exec rake rubocop
sinatra_tests:
script:
- cd sinatra
- bundle exec rake test