Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NEW] Run CircleCI with and without Apps Framework enabled #10707

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ jobs:
TEST_MODE: "true"
MONGO_URL: mongodb://localhost:27017/testwithoplog
MONGO_OPLOG_URL: mongodb://localhost:27017/local
USE_UNRELEASED_ROCKETAPPS_FRAMEWORK: "false"

steps:
- attach_workspace:
Expand Down Expand Up @@ -185,6 +186,83 @@ jobs:
environment:
TEST_MODE: "true"
MONGO_URL: mongodb://localhost:27017/testwithoplog
USE_UNRELEASED_ROCKETAPPS_FRAMEWORK: "false"

steps:
- attach_workspace:
at: /tmp

- checkout

- run:
name: NPM install
command: |
npm install

- run:
name: Run Tests
command: |
for i in $(seq 1 5); do npm test && s=0 && break || s=$? && sleep 1; done; (exit $s)

- store_artifacts:
path: .screenshots/

test-with-oplog-and-apps:
<<: *defaults
docker:
- image: circleci/node:8.9-browsers
- image: mongo:3.4
command: [mongod, --nojournal, --noprealloc, --smallfiles, --replSet=rs0]

environment:
TEST_MODE: "true"
MONGO_URL: mongodb://localhost:27017/testwithoplog
MONGO_OPLOG_URL: mongodb://localhost:27017/local
USE_UNRELEASED_ROCKETAPPS_FRAMEWORK: "true"

steps:
- attach_workspace:
at: /tmp

- checkout

- run:
name: Install dependencies
command: |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org-shell

- run:
name: Configure Replica Set
command: |
mongo --eval 'rs.initiate({_id:"rs0", members: [{"_id":1, "host":"localhost:27017"}]})'
mongo --eval 'rs.status()'

- run:
name: NPM install
command: |
npm install

- run:
name: Run Tests
command: |
for i in $(seq 1 5); do npm test && s=0 && break || s=$? && sleep 1; done; (exit $s)

- store_artifacts:
path: .screenshots/

test-with-apps:
<<: *defaults
docker:
- image: circleci/node:8.9-browsers
- image: circleci/mongo:3.4

environment:
TEST_MODE: "true"
MONGO_URL: mongodb://localhost:27017/testwithoplog
USE_UNRELEASED_ROCKETAPPS_FRAMEWORK: "true"

steps:
- attach_workspace:
Expand Down Expand Up @@ -269,10 +347,24 @@ workflows:
filters:
tags:
only: /^[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)?$/
- test-with-oplog-and-apps:
requires:
- build
filters:
tags:
only: /^[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)?$/
- test-with-apps:
requires:
- build
filters:
tags:
only: /^[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)?$/
- deploy:
requires:
- test-with-oplog
- test-without-oplog
- test-with-oplog-and-apps
- test-with-apps
filters:
branches:
only: develop
Expand Down