.gitlab-ci.yml 2.22 KB
Newer Older
Valery Sizov's avatar
Valery Sizov committed
1
# This file is generated by GitLab CI
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
2
before_script:
3
  - ./scripts/prepare_build.sh
Valery Sizov's avatar
Valery Sizov committed
4 5
  - ruby -v
  - which ruby
6
  - gem install bundler --no-ri --no-rdoc
Valery Sizov's avatar
Valery Sizov committed
7 8 9
  - cp config/gitlab.yml.example config/gitlab.yml
  - touch log/application.log
  - touch log/test.log
10
  - bundle install --without postgres production --jobs $(nproc)  "${FLAGS[@]}"
11
  - bundle exec rake db:reset db:create RAILS_ENV=test
12 13 14

spec:feature:
  script:
15
    - RAILS_ENV=test bundle exec rake assets:precompile 2>/dev/null
16 17 18 19 20 21 22 23 24 25 26 27
    - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:feature
  tags:
    - ruby
    - mysql

spec:api:
  script:
    - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:api
  tags:
    - ruby
    - mysql

Douwe Maan's avatar
Douwe Maan committed
28 29 30 31 32 33 34
spec:models:
  script:
    - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:models
  tags:
    - ruby
    - mysql

Douwe Maan's avatar
Douwe Maan committed
35 36 37 38 39 40 41 42 43 44 45 46 47 48
spec:lib:
  script:
    - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:lib
  tags:
    - ruby
    - mysql

spec:services:
  script:
    - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:services
  tags:
    - ruby
    - mysql

49 50 51 52 53 54
spec:benchmark:
  script:
    - RAILS_ENV=test bundle exec rake spec:benchmark
  tags:
    - ruby
    - mysql
55
  allow_failure: true
56

57 58 59 60 61 62 63
spec:other:
  script:
    - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:other
  tags:
    - ruby
    - mysql

Douwe Maan's avatar
Douwe Maan committed
64
spinach:project:half:
Valery Sizov's avatar
Valery Sizov committed
65
  script:
Douwe Maan's avatar
Douwe Maan committed
66 67 68 69 70 71
    - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:project:half
  tags:
    - ruby
    - mysql

spinach:project:rest:
Valery Sizov's avatar
Valery Sizov committed
72
  script:
Douwe Maan's avatar
Douwe Maan committed
73
    - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:project:rest
Valery Sizov's avatar
Valery Sizov committed
74 75 76 77
  tags:
    - ruby
    - mysql

78
spinach:other:
Valery Sizov's avatar
Valery Sizov committed
79
  script:
80
    - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:other
Valery Sizov's avatar
Valery Sizov committed
81 82 83 84
  tags:
    - ruby
    - mysql

85
teaspoon:
Valery Sizov's avatar
Valery Sizov committed
86
  script:
87
    - RAILS_ENV=test bundle exec teaspoon
Valery Sizov's avatar
Valery Sizov committed
88 89 90 91
  tags:
    - ruby
    - mysql

92
rubocop:
Valery Sizov's avatar
Valery Sizov committed
93 94 95 96 97 98
  script:
    - bundle exec rubocop
  tags:
    - ruby
    - mysql

99
brakeman:
Valery Sizov's avatar
Valery Sizov committed
100 101 102 103
  script:
    - bundle exec rake brakeman
  tags:
    - ruby
104
    - mysql
105 106 107 108 109 110 111

flog:
  script:
    - bundle exec rake flog
  tags:
    - ruby
    - mysql
112 113 114 115 116 117 118

flay:
  script:
    - bundle exec rake flay
  tags:
    - ruby
    - mysql
119

120
bundler:audit:
121
  script: 
122 123
    - "bundle exec bundle-audit update"
    - "bundle exec bundle-audit check"
124 125 126
  tags:
    - ruby
    - mysql
127
  allow_failure: true