parent
a75140b08c
commit
7a0466f9fd
|
@ -0,0 +1,37 @@
|
||||||
|
version: 2
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
working_directory: ~/outline
|
||||||
|
docker:
|
||||||
|
- image: circleci/node:8.11
|
||||||
|
- image: circleci/redis:latest
|
||||||
|
- image: circleci/postgres:9.6.5-alpine-ram
|
||||||
|
environment:
|
||||||
|
NODE_ENV: test
|
||||||
|
SECRET_KEY: F0E5AD933D7F6FD8F4DBB3E038C501C052DC0593C686D21ACB30AE205D2F634B
|
||||||
|
DATABASE_URL_TEST: postgres://root@localhost:5432/circle_test
|
||||||
|
DATABASE_URL: postgres://root@localhost:5432/circle_test
|
||||||
|
URL: http://localhost:3000
|
||||||
|
SMTP_FROM_EMAIL: hello@example.com
|
||||||
|
AWS_S3_UPLOAD_BUCKET_URL: https://s3.amazonaws.com
|
||||||
|
AWS_S3_UPLOAD_BUCKET_NAME: outline-circle
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- restore_cache:
|
||||||
|
key: dependency-cache-{{ checksum "package.json" }}
|
||||||
|
- run:
|
||||||
|
name: install-deps
|
||||||
|
command: yarn install --pure-lockfile
|
||||||
|
- save_cache:
|
||||||
|
key: dependency-cache-{{ checksum "package.json" }}
|
||||||
|
paths:
|
||||||
|
- ./node_modules
|
||||||
|
- run:
|
||||||
|
name: migrate
|
||||||
|
command: ./node_modules/.bin/sequelize db:migrate --url $DATABASE_URL_TEST
|
||||||
|
- run:
|
||||||
|
name: test
|
||||||
|
command: yarn test
|
||||||
|
- run:
|
||||||
|
name: lint
|
||||||
|
command: yarn lint
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
curl --user ${CIRCLE_TOKEN}: \
|
||||||
|
--request POST \
|
||||||
|
--form revision=<ENTER COMMIT SHA HERE>\
|
||||||
|
--form config=@config.yml \
|
||||||
|
--form notify=false \
|
||||||
|
https://circleci.com/api/v1.1/project/github/outline/outline/tree/master
|
28
circle.yml
28
circle.yml
|
@ -1,28 +0,0 @@
|
||||||
machine:
|
|
||||||
node:
|
|
||||||
version: 8.11
|
|
||||||
services:
|
|
||||||
- redis
|
|
||||||
environment:
|
|
||||||
NODE_ENV: test
|
|
||||||
PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"
|
|
||||||
SECRET_KEY: F0E5AD933D7F6FD8F4DBB3E038C501C052DC0593C686D21ACB30AE205D2F634B
|
|
||||||
DATABASE_URL_TEST: postgres://ubuntu@localhost:5432/circle_test
|
|
||||||
DATABASE_URL: postgres://ubuntu@localhost:5432/circle_test
|
|
||||||
URL: http://localhost:3000
|
|
||||||
SMTP_FROM_EMAIL: hello@example.com
|
|
||||||
AWS_S3_UPLOAD_BUCKET_URL: https://s3.amazonaws.com
|
|
||||||
AWS_S3_UPLOAD_BUCKET_NAME: outline-circle
|
|
||||||
|
|
||||||
dependencies:
|
|
||||||
override:
|
|
||||||
- yarn install --pure-lockfile
|
|
||||||
cache_directories:
|
|
||||||
- ~/.cache/yarn
|
|
||||||
|
|
||||||
test:
|
|
||||||
pre:
|
|
||||||
- sequelize db:migrate --url postgres://ubuntu@localhost:5432/circle_test
|
|
||||||
override:
|
|
||||||
- yarn test
|
|
||||||
- yarn lint
|
|
Reference in New Issue