forked from postlight/lux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
77 lines (74 loc) · 1.73 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
machine:
node:
version: 6
environment:
NODE_ENV: test
DROP_DATABASE: DROP DATABASE IF EXISTS lux_test;
CREATE_DATABASE: CREATE DATABASE lux_test;
DATABASE_USERNAME: ubuntu
database:
override:
- psql -c "$DROP_DATABASE" -U postgres
- psql -c "$CREATE_DATABASE" -U postgres
- mysql -e "$DROP_DATABASE"
- mysql -e "$CREATE_DATABASE"
dependencies:
pre:
- |
cd ../
if [ -d watchman ]; then
cd watchman
sudo make install
else
git clone https://github.com/facebook/watchman.git
cd watchman
git checkout v4.7.0
./autogen.sh
./configure
make
sudo make install
fi
cd ../lux
override:
- npm install
- npm link
post:
- |
cd test/test-app
npm install
cd ../../
cache_directories:
- /home/ubuntu/watchman
compile:
pre:
- npm run clean
override:
- npm run build
test:
pre:
- case $CIRCLE_NODE_INDEX in 0) export DATABASE_DRIVER="pg" ;; 1) export DATABASE_DRIVER="mysql2" ;; 2) export DATABASE_DRIVER="sqlite3" ;; esac:
parallel: true
override:
- npm run flow:
parallel: true
- npm run lint:
parallel: true
- npm test -- -R mocha-junit-reporter:
parallel: true
environment:
MOCHA_FILE: $CIRCLE_TEST_REPORTS/junit/test-results.xml
post:
- npm run codecov:
parallel: true
notify:
webhooks:
- url: https://webhooks.gitter.im/e/6d49c9b19c888dba70b8
deployment:
release:
tag: /^(?:v\d.\d.\d)$/
commands:
- npm run clean
- npm run build
- rm -rf ~/.npmrc && touch ~/.npmrc
- echo //registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN >> ~/.npmrc
- npm publish