mirror of
https://github.com/wassname/talk.git
synced 2026-06-29 04:11:26 +08:00
46 lines
976 B
YAML
46 lines
976 B
YAML
machine:
|
|
node:
|
|
version: 7
|
|
services:
|
|
- docker
|
|
- redis
|
|
environment:
|
|
PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"
|
|
NODE_ENV: "test"
|
|
|
|
dependencies:
|
|
override:
|
|
- yarn
|
|
cache_directories:
|
|
- ~/.cache/yarn
|
|
post:
|
|
# Build the static assets
|
|
- yarn build
|
|
# Lint the project here, before tests are ran.
|
|
- yarn lint
|
|
|
|
database:
|
|
post:
|
|
# Initialize the settings in the database, this will create indicies for the
|
|
# database.
|
|
- ./bin/cli setup --defaults
|
|
- sleep 2
|
|
|
|
test:
|
|
override:
|
|
# Run the tests using the junit reporter.
|
|
- MOCHA_FILE=$CIRCLE_TEST_REPORTS/junit/test-results.xml MOCHA_REPORTER=mocha-junit-reporter yarn test
|
|
# Run the e2e test suite
|
|
- E2E_REPORT_PATH=$CIRCLE_TEST_REPORTS/e2e yarn e2e
|
|
|
|
deployment:
|
|
release:
|
|
tag: /[0-9]+(\.[0-9]+)*/
|
|
commands:
|
|
- bash ./scripts/deploy.sh
|
|
|
|
latest:
|
|
branch: master
|
|
commands:
|
|
- bash ./scripts/deploy.sh
|