-
Notifications
You must be signed in to change notification settings - Fork 58
/
circle.yml
51 lines (43 loc) · 1.68 KB
/
circle.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
machine:
node:
version: 6.5.0
java:
# This is needed by Chimp to run Selenium so we can start Chrome and Firefox
version: oraclejdk8
environment:
# Circle runs each command in a separate shell. This mechanism allows us to centralize variables in this file
DEPLOY_SITE: qualityfaster
BROWSER: chrome
dependencies:
cache_directories:
- "node_modules"
- "~/.npm"
- "~/.meteor"
override:
# Install & cache Meteor
- scripts/install-meteor.sh
# Install and cache NPM dependencies
- npm install
# Download & cache Chimp's dependencies
- scripts/download-chimp-dependencies.sh
# Download & cache Karma's dependencies
- scripts/download-karma-dependencies.sh
test:
override:
# The build & test lifecycle is orchestrated by Gulp, which is wired up through npm's test script
- npm test
# For the deployment code below to work, you need to first carry out the following steps on your local machine:
# 1. Create a Meteor developer account and sign-up for Galaxy
# 2a. Login with Meteor and save the session to file
# METEOR_SESSION_FILE=meteor-session-file.json meteor login
# 2b. Use Node.js to encode and output the file as a Base64 string
# FILE_CONTENT=`cat meteor-session-file.json` node -e "console.log(new Buffer(process.env.FILE_CONTENT).toString('base64'))"
# 3. Copy & paste the output in an environment variable called METEOR_SESSION_FILE_CONTENT in the project settings on CircleCI
deployment:
# We deploy to production any time the previous test step passed AND...
production:
# ...when the commit is made to this branch
branch: master
commands:
# We use the script to deploy
- scripts/deploy.sh