-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
caf4417
commit 67f3a98
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
|
||
version: 2 | ||
jobs: | ||
build: | ||
|
||
docker: | ||
# The primary container is an instance of the first list image listed. Your build commands run in this container. | ||
- image: circleci/ruby:2.4.1-node-browsers | ||
environment: | ||
RAILS_ENV: test | ||
PULMAP_DB_HOST: localhost | ||
PULMAP_DB_USERNAME: geoblacklight | ||
|
||
working_directory: ~/pulmap | ||
steps: | ||
- checkout | ||
|
||
# Only necessary if app uses webpacker or yarn in some other way | ||
- restore_cache: | ||
keys: | ||
- pulmap-{{ checksum "package-lock.json" }} | ||
- pulmap- | ||
- run: | ||
name: NPM Install | ||
command: npm install | ||
# Store yarn / webpacker cache | ||
- save_cache: | ||
key: pulmap-{{ checksum "package-lock.json" }} | ||
paths: | ||
- npm_modules | ||
|
||
- persist_to_workspace: | ||
root: '~/pulmap' | ||
paths: '*' | ||
|
||
# Download and cache dependencies | ||
- restore_cache: | ||
keys: | ||
- pulmap-{{ checksum "Gemfile.lock" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- pulmap- | ||
|
||
- run: | ||
name: Install dependencies | ||
command: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs 4 --retry 3 | ||
|
||
- run: gem update --system | ||
|
||
- save_cache: | ||
paths: | ||
- ./vendor/bundle | ||
key: pulmap-{{ checksum "Gemfile.lock" }} | ||
|
||
- run: NODE_ENV=test bundle exec rails webpacker:compile | ||
|
||
- run: | ||
name: Database setup | ||
command: bundle exec rake db:migrate | ||
# command: bundle exec rake geoblacklight:server | ||
background: true | ||
|
||
- run: bundle exec rake ci |