.gitlab-ci.yml 1.04 KB
Newer Older
1 2 3 4 5
include:
  - project: gitlab-ci/rails-testing
    ref: v1
    file: rails-testing.yml

6
image: git.panter.ch:5001/open-source/aoz-003/gitlab_ci:2.6.6
7

Andi Staub's avatar
Andi Staub committed
8 9 10 11
stages:
  - test

services:
Markus Koller's avatar
Markus Koller committed
12
  - postgres:9.6
Andi Staub's avatar
Andi Staub committed
13 14 15

variables:
  RAILS_ENV: test
Andi Staub's avatar
Andi Staub committed
16
  POSTGRES_DB: aoz_test
17
  DATABASE_URL: 'postgresql://postgres:postgres@localhost:5432/$POSTGRES_DB'
18
  POSTGRES_HOST_AUTH_METHOD: trust
Andi Staub's avatar
Andi Staub committed
19

20
lint:
21
  stage: test
22
  extends:
23 24 25
    - .cache-pull-push
    - .retry-dropped-runners
    - .bundle-yarn-install-webdrivers-chrome
26
  script:
27
    - bundle exec rails db:schema:load # some RuboCop cops require it
28 29
    - yarn lint:js
    - yarn lint:css
30
    - bundle exec rubocop
31

32
test:
33
  stage: test
34
  extends:
35
    - .cache-pull
36
    - .retry-dropped-runners
37
    - .bundle-yarn-install
Andi Staub's avatar
Andi Staub committed
38
  script:
39
    - bundle exec rails db:schema:load
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
40
    - bundle exec rails test
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
41

42
system:
43
  stage: test
44
  extends:
45
    - .cache-pull
46
    - .retry-dropped-runners
47 48
    - .bundle-yarn-install-webdrivers-chrome
    - .capybara-screenshot-artifacts
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
49
  script:
50
    - bundle exec rails db:schema:load
Markus Koller's avatar
Markus Koller committed
51
    - bundle exec rails test:system