-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
43 lines (36 loc) · 830 Bytes
/
.gitlab-ci.yml
File metadata and controls
43 lines (36 loc) · 830 Bytes
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
image: git.panter.ch:5001/panter/gitlab-ci-docker-images/ruby-and-rails:ruby-2.4.4-imagemagick-node-8-chrome
stages:
- test
services:
- postgres:9.6
cache:
key: "$CI_PROJECT_ID"
paths:
- tmp/cache/ruby
- tmp/cache/yarn
variables:
RAILS_ENV: test
POSTGRES_DB: aoz_test
DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/$POSTGRES_DB"
before_script:
- node --version
- ruby --version
- yarn --version
- bundle install --without development --path tmp/cache
- yarn install --cache-folder tmp/cache/yarn
- bundle exec rails db:schema:load
test:
stage: test
script:
- bundle exec rails test
system:
stage: test
script:
- bundle exec rails test:system
artifacts:
paths:
- tmp/screenshots
when: on_failure
expire_in: 1 week
cache:
policy: pull