-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
52 lines (46 loc) · 970 Bytes
/
.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
image: microstudi/decidim-test:0.10
services:
- postgres:12.0
stages:
- test
- precompile
variables:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: postgres
POSTGRES_HOST: postgres
RAILS_ENV: test
BUNDLE_PATH: vendor/bundle
test-job:
stage: test
cache:
paths:
- node_modules/
- .yarn
- vendor
- public/packs-test
before_script:
# check if all is OK
- chromedriver -v
- node -v
- yarn -v
- ruby -v
- which ruby
- gem install bundler -v 2.3.13
- bundle install --jobs $(nproc) "${FLAGS[@]}" --path vendor
- yarn install
# Database setup
- bundle exec rails db:create db:schema:load --trace
script:
- bundle exec rspec spec
precompile-job:
stage: precompile
cache:
paths:
- node_modules/
- .yarn
- vendor
- public/packs-test
script:
- bundle exec rake assets:precompile