-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
59 lines (53 loc) · 1.91 KB
/
.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
52
53
54
55
56
57
58
59
image: "registry.gitlab.com/touchcard/api/environment:latest"
services:
- postgres:latest
variables:
POSTGRES_DB: touchcard_test
# Cache gems in between builds
cache:
paths:
# Gems caching on Gitlab CI is not currently working. Executing the runner locally didn't support the cache properly
# and it was taking too long, so instead we pre-cache global gems in the Dockerfile.
# We may be able to pre-cache them in `/builds/touchcard/api/` instead and re-enable the Gitlab CI cache.
# Alternatively - if we skip the need for caching in local executions we can probably live with the CI cache alone.
# - vendor/ruby
# Node module caching, on the other hand, seems to be working in reverse. I don't think the CI runner picks up
# cached node modules in the Docker container
- node_modules
before_script:
- pwd
- yarn -v
- yarn install --pure-lockfile
- ruby -v
- gem install bundler --no-ri --no-rdoc
- bundle install -j $(nproc) --path vendor # See note on caching above
- bundle --version
- bundle install -j $(nproc)
- RAILS_ENV=test bundle exec rake db:create db:schema:load
rspec:
artifacts:
when: always
paths:
- tmp/render/*
expire_in: 1 week
variables:
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB"
AWS_ACCESS_KEY_ID: 'DUMMY'
AWS_SECRET_ACCESS_KEY: 'DUMMY'
AWS_REGION: 'DUMMY'
LOB_API_KEY: 'DUMMY'
SHOPIFY_CLIENT_API_KEY: '11111'
SHOPIFY_CLIENT_API_SECRET: '11111'
APP_URL: 'DUMMY'
REDISCLOUD_URL: 'DUMMY'
MAIL_FROM: 'DUMMY'
MAILGUN_API_KEY: 'DUMMY'
MAILGUN_DOMAIN: 'DUMMY'
AC_ENDPOINT: 'https://touchcard.api-us1.com/admin/api.php'
AC_API_KEY: 'DUMMY'
AC_INSTALLED_SHOP_LIST_ID: '1'
AC_CUSTOMERS_LIST_ID: '9'
SUBSCRIPTIONS_GOAL_STRING: 'DUMMY'
SLACK_URL: 'https://hooks.slack.com/services/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'
script:
- RAILS_ENV=test bundle exec rspec