GitLab steht Mittwoch, den 23. September, zwischen 10:00 und 12:00 Uhr aufgrund von Wartungsarbeiten nicht zur Verfügung.

.gitlab-ci.yml 1.38 KB
Newer Older
1
image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.3-git-2.7-phantomjs-2.1"
2

3
cache:
Z.J. van de Weg's avatar
Z.J. van de Weg committed
4
  key: "ruby-231"
5
  paths:
6
  - vendor/ruby
7

8 9
variables:
  MYSQL_ALLOW_EMPTY_PASSWORD: "1"
Kamil Trzcinski's avatar
Kamil Trzcinski committed
10 11
  # retry tests only in CI environment
  RSPEC_RETRY_RETRY_COUNT: "3"
Kamil Trzcinski's avatar
Kamil Trzcinski committed
12 13
  RAILS_ENV: "test"
  SIMPLECOV: "true"
14
  SETUP_DB: "true"
Kamil Trzcinski's avatar
Kamil Trzcinski committed
15
  USE_BUNDLE_INSTALL: "true"
16
  GIT_DEPTH: "20"
17
  PHANTOMJS_VERSION: "2.1.1"
18

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
19
before_script:
20
  - source ./scripts/prepare_build.sh
Valery Sizov's avatar
Valery Sizov committed
21
  - cp config/gitlab.yml.example config/gitlab.yml
Kamil Trzcinski's avatar
Test  
Kamil Trzcinski committed
22
  - bundle --version
Kamil Trzcinski's avatar
Kamil Trzcinski committed
23
  - '[ "$USE_BUNDLE_INSTALL" != "true" ] || retry bundle install --without postgres production --jobs $(nproc) "${FLAGS[@]}"'
Kamil Trzcinski's avatar
Kamil Trzcinski committed
24
  - retry gem install knapsack
Alfredo Sumaran's avatar
Alfredo Sumaran committed
25
  - '[ "$SETUP_DB" != "true" ] || bundle exec rake db:drop db:create db:schema:load db:migrate add_limits_mysql'
26

Kamil Trzcinski's avatar
Kamil Trzcinski committed
27
stages:
Kamil Trzcinski's avatar
Kamil Trzcinski committed
28
- prepare
Kamil Trzcinski's avatar
Kamil Trzcinski committed
29
- test
30
- post-test
31
- pages
32

33
.use-db: &use-db
34 35 36
  services:
    - mysql:latest
    - redis:alpine
37

38 39 40
migration paths:
  stage: test
  <<: *use-db
41 42
  variables:
    SETUP_DB: "false"
43 44 45 46
  script:
    - git checkout HEAD .
    - git fetch --tags
    - git checkout v8.5.9
47 48
    - cp config/resque.yml.example config/resque.yml
    - sed -i 's/localhost/redis/g' config/resque.yml
Kamil Trzcinski's avatar
Kamil Trzcinski committed
49
    - bundle install --without postgres production --jobs $(nproc) ${FLAGS[@]} --retry=3
50 51
    - rake db:drop db:create db:schema:load db:seed_fu
    - git checkout $CI_BUILD_REF
52
    - source scripts/prepare_build.sh
53
    - rake db:migrate