create a circle.yml
file in your root directory, using the above as a template.
By default this assumes:
- you have development tools assetsand config in your root project directory
- you have your meteor app in the
/app
directory. - you're using grunt from your root directory, this could be any task runner
- you've setup a test command using your package.json (circle automatically runs this, you could also create overrides)
You'll require a deployment token run this on the command line
METEOR_SESSION_FILE=deployment_token.json meteor login
You'll then need to add three environmental variables to your project on circle CI,
- DEPLOYMENT_TOKEN - copy the content of the file you created above as the value.
- STAGE_SETTINGS - copy the contents of your settings file for your staging environment as the value
- PROD_SETTINGS - copy the contents of your settings file for your production environment as the value
You should be all set.
for linting I've got the following in my package.json
:
"devDependencies": {
"babel-eslint": "^7.1.1",
"eslint": "^3.15.0",
"eslint-config-airbnb": "^14.1.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-react": "^6.10.0",
"eslint-plugin-standard": "^2.0.1"
}
I use the pretest script hook in the package.json
to run the linting before any tests.
"scripts": {
"pretest": "npm run lint",
"test": "echo 'tests coming soon!'",
"lint": "./node_modules/.bin/eslint ./app",
},