File tree Expand file tree Collapse file tree 2 files changed +40
-1
lines changed Expand file tree Collapse file tree 2 files changed +40
-1
lines changed Original file line number Diff line number Diff line change
1
+ language : node_js
2
+ node_js :
3
+ - " stable"
4
+ cache :
5
+ directories :
6
+ - " node_modules"
7
+ install :
8
+ - npm install
9
+ services :
10
+ - postgresql
11
+ addons :
12
+ hosts :
13
+ - localhost
14
+ - 127.0.0.1
15
+
16
+ env :
17
+ global :
18
+ - NODE_ENV=test
19
+ - DB_USER_test=teamwork_user
20
+ - DB_PASSWORD_test=teamwork_password
21
+ - DB_HOST_test=localhost
22
+ - DB_PORT_test='5432'
23
+ - DB_DATABASE_test=teamwork_api_test
24
+ - SECRET=teamwork-api-secret-key
25
+
26
+ before_script :
27
+ - psql -c 'create database teamwork_api_test;' -U postgres
28
+ - psql -c "CREATE USER teamwork_user WITH PASSWORD 'teamwork_password';" -U postgres
29
+ - psql -U teamwork_user -d teamwork_api_test -a -f ./init.sql
30
+ - npm run build
31
+ script :
32
+ - npm test
33
+ after_success :
34
+ - npm run coverage
Original file line number Diff line number Diff line change 10
10
"dev_server" : " nodemon --exec babel-node ./api/v1/server.js" ,
11
11
"test" : " mocha --require @babel/register ./api/v1/test --timeout 30000 --exit" ,
12
12
"build" : " rm -rf ./build && babel -d ./build ./api/v1 -s" ,
13
- "coverage" : " nyc npm run test"
13
+ "generate-lcov" : " nyc report --reporter=text-lcov > lcov.info" ,
14
+ "coveralls-coverage" : " coveralls < lcov.info" ,
15
+ "codeclimate-coverage" : " codeclimate-test-reporter < lcov.info" ,
16
+ "coverage" : " nyc npm run test && npm run generate-lcov && npm run coveralls-coverage && npm run codeclimate-coverage"
14
17
},
15
18
"repository" : {
16
19
"type" : " git" ,
49
52
"babel-loader" : " ^8.0.6" ,
50
53
"chai" : " ^4.2.0" ,
51
54
"chai-http" : " ^4.3.0" ,
55
+ "codeclimate-test-reporter" : " ^0.5.1" ,
56
+ "coveralls" : " ^3.0.8" ,
52
57
"eslint" : " ^6.6.0" ,
53
58
"eslint-config-airbnb-base" : " ^14.0.0" ,
54
59
"eslint-plugin-import" : " ^2.18.2" ,
You can’t perform that action at this time.
0 commit comments