-
Notifications
You must be signed in to change notification settings - Fork 159
/
Copy pathconfig.yml
87 lines (77 loc) · 2.26 KB
/
config.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
version: 2.1
workflows:
version: 2.1
build:
jobs:
- build_and_test
orbs:
browser-tools: circleci/browser-tools@1.4
jobs:
build_and_test:
working_directory: ~/cfp_app
docker:
- image: cimg/ruby:3.1.6-browsers
environment:
PGHOST: localhost
PGUSER: cfp_app
RAILS_ENV: test
- image: postgres:12.5
environment:
POSTGRES_USER: cfp_app
POSTGRES_DB: cfp_app_test
POSTGRES_PASSWORD: ""
POSTGRES_HOST_AUTH_METHOD: trust
steps:
- browser-tools/install-browser-tools
- checkout
- run: |
ruby --version
node --version
java --version
google-chrome --version
- run: gem install bundler
- run: yarn install
# Restore Cached gem Dependencies
- restore_cache:
keys:
- cfp_app-gems-{{ checksum "Gemfile.lock" }}
- cfp_app-gems-
# Restore Cached node module Dependencies
- restore_cache:
keys:
- cfp_app-packages-{{ checksum "yarn.lock" }}
- cfp_app-packages-
# Bundle install dependencies
- run: bundle config set path 'vendor/bundle'
- run: bundle install
## Cache Dependencies
# Generate this fallback cache first because the most recent match
# will be used even if there is a more precise match
- save_cache:
key: cfp_app-gems-
paths:
- vendor/bundle
# Generate a cache for this exact Gemfile.lock
- save_cache:
key: cfp_app-gems-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
# Generate a fallback cache of node packages
- save_cache:
key: cfp_app-packages-
paths:
- node_modules
# Generate a cache for this exact yarn.lock
- save_cache:
key: cfp_app-packages-{{ checksum "yarn.lock" }}
paths:
- node_modules
# Wait for DB
- run: dockerize -wait tcp://localhost:5432 -timeout 1m
# Setup the database
- run: bundle exec rake db:setup
# Run the tests
- run: bin/rake
# Store failed js spec artifacts
- store_artifacts:
path: tmp/screenshots