This repository has been archived by the owner on Sep 21, 2022. It is now read-only.
generated from reactioncommerce/api-plugin-example
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Akarshit Wal <[email protected]>
- Loading branch information
Showing
1 changed file
with
35 additions
and
9 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 |
---|---|---|
|
@@ -27,9 +27,9 @@ jobs: | |
|
||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "package.json" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
- v1-dependencies-{{ checksum "package.json" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
|
||
- run: npx semantic-release | ||
|
||
|
@@ -42,12 +42,34 @@ jobs: | |
|
||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "package.json" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
- v1-dependencies-{{ checksum "package.json" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
|
||
- run: npm run lint | ||
|
||
test-integration: | ||
docker: | ||
- image: circleci/node:14.11.0-stretch | ||
# Integration tests need MongoDB server running and accessible on port 27017 | ||
- image: circleci/mongo:4.2.0 | ||
command: | | ||
mongod --oplogSize 128 --replSet rs0 --storageEngine=wiredTiger | ||
mongo --host localhost:27017 \<<EOF | ||
rs.initiate(); | ||
EOF | ||
ports: | ||
- "27017:27017" | ||
steps: | ||
- checkout | ||
- run: | ||
name: Run Integration Tests | ||
environment: | ||
MONGO_URL: mongodb://localhost:27017/test | ||
MONGO_USE_UNIFIED_TOPOLOGY: false | ||
command: npx --quiet --package @reactioncommerce/[email protected] run-integration-tests | ||
|
||
test: | ||
docker: | ||
- image: node:12.14.1 | ||
|
@@ -57,9 +79,9 @@ jobs: | |
|
||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "package.json" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
- v1-dependencies-{{ checksum "package.json" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
|
||
- run: npm run test | ||
|
||
|
@@ -75,11 +97,15 @@ workflows: | |
- test: | ||
requires: | ||
- build | ||
- test-integration: | ||
requires: | ||
- build | ||
- deploy: | ||
context: reaction-publish-semantic-release | ||
requires: | ||
- lint | ||
- test | ||
- test-integration | ||
filters: | ||
branches: | ||
only: trunk |