-
Notifications
You must be signed in to change notification settings - Fork 96
/
config.yml
68 lines (60 loc) · 1.57 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
version: 2.1
orbs:
browser-tools: circleci/[email protected]
jobs:
test-job:
working_directory: ~/jpmobile
docker:
- image: cimg/ruby:3.3-browsers
environment:
BUNDLE_JOBS: 3
BUNDLE_RETRY: 3
BUNDLE_PATH: vendor/bundle
RAILS_ENV: test
steps:
- browser-tools/install-browser-tools
- checkout
# Install dependent packages
- run:
name: Install dependent packages
command: |
sudo apt update
sudo apt install -y cmake libsqlite3-dev
# Which version of bundler?
- run:
name: Which bundler?
command: bundle -v
# Restore bundle cache
- restore_cache:
keys:
- jpmobile-bundle-v1-{{ checksum "Gemfile.lock" }}
- run:
name: Bundle Install
command: |
bundle config set --local clean true
bundle config set --local path vendor/bundle
bundle check || bundle install
# Store bundle cache
- save_cache:
key: jpmobile-bundle-v1-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
# rubocop
- run:
name: rubocop
command: |
bundle exec rubocop
environment:
BUNDLE_GEMFILE: ~/jpmobile/Gemfile
# Run rspec in parallel
- run:
name: test
command: |
bundle exec rake test
environment:
BUNDLE_GEMFILE: ~/jpmobile/Gemfile
workflows:
version: 2
run-test:
jobs:
- test-job