.gitlab-ci.yml 2.29 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
  - RAILS_ENV=test bundle exec rake db:drop db:create db:schema:load db:migrate
12

13 14 15
variables:
  MYSQL_ALLOW_EMPTY_PASSWORD: "1"

16 17
spec:feature:
  script:
18
    - RAILS_ENV=test bundle exec rake assets:precompile 2>/dev/null
19 20 21 22 23 24 25 26 27 28 29 30
    - 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
31 32 33 34 35 36 37
spec:models:
  script:
    - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:models
  tags:
    - ruby
    - mysql

Douwe Maan's avatar
Douwe Maan committed
38 39 40 41 42 43 44 45 46 47 48 49 50 51
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

52 53 54 55 56 57
spec:benchmark:
  script:
    - RAILS_ENV=test bundle exec rake spec:benchmark
  tags:
    - ruby
    - mysql
58
  allow_failure: true
59

60 61 62 63 64 65 66
spec:other:
  script:
    - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:other
  tags:
    - ruby
    - mysql

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

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

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

88
teaspoon:
Valery Sizov's avatar
Valery Sizov committed
89
  script:
90
    - RAILS_ENV=test bundle exec teaspoon
Valery Sizov's avatar
Valery Sizov committed
91 92 93 94
  tags:
    - ruby
    - mysql

95
rubocop:
Valery Sizov's avatar
Valery Sizov committed
96 97 98 99 100 101
  script:
    - bundle exec rubocop
  tags:
    - ruby
    - mysql

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

flog:
  script:
    - bundle exec rake flog
  tags:
    - ruby
    - mysql
115 116 117 118 119 120 121

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

123
bundler:audit:
124
  script:
125 126
    - "bundle exec bundle-audit update"
    - "bundle exec bundle-audit check"
127 128 129
  tags:
    - ruby
    - mysql
130
  allow_failure: true