generated from JustalK/SERVER-API
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
65 lines (65 loc) · 3.81 KB
/
.travis.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
env:
global:
- secure: StAj8h4P9srK9Cvn0ZSlqKt1pVoJ+htUXmJF7MC6UUu3hYOiW8FqM0wgCGTvPZ12Dw96mr9adxP42yDEcntbGeWRybKAw7VKA05uRfMWPvfRQUtwu/cAmIBmSbq6mSqc7MPOpcMdqw0CToPnr0wQXTdRjuHDy3JCJK1uJ9/y8jvhKeu/XyqhNxsHwDZBKDket+aiyUO+jrN6wUbubbfYV56/HSFTxI9meQLoM6e0H+A0MOETdA4W+8ATDbMDjvC22zeq9fFl4G8ysmpjLuTx1Iazsv22GcucM8RbqR+n5yhDb2kT2ifhnWzey+DOYBEmhfMkdP0WFCONmDl2ZtU9E0Slzsjmbc3II9Kq20wK7mrgX5Yh8vf+d2h9GmbkBCaLt7O8AqvF6sATMHEppEH/0O+Wj+vqK5+OuzIgpYJ2vWI6nZqUs5pnNuaegtVH3lXe8nIuHorpJKiCWHmDcWpfgkjf6KZMs3frx5K2mhxK/XhdlfKn+RMnPzl27f5QHc3KF3yfa8DQvlvP9bpPF9xtMTLmaEJzpQGvMBQrapGF5UrhwtZf082mLDCgoGwCcXr7btfFDeT6oY+HPwg1hhYFi+7sfEBpoOdv43JJD6XrljGTaJ4Tb6zo59HWL6kOl9bN0OckNP0fjn//nbCrxs6si4CXiyRCc83xZh/sgbEhTbI=
- secure: YrGi6O19oxgwnOsvd9qs5hDYrlgt5mvl3p5EGdwAxjlOhS5uswWglLsBvzu2LKC3yjj3k0haqxVbrDIxZ4s/4e3O/pUw/jNlatq4IP+/eBQ6mdKKL3VFTp+k3JrILB7u3E6iCKeE73MyrzEpSy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kJNQ/6uSj6pEijKzHw7Z/OimZ4NhOLUsKd2iVI3iKpLEwZ6IIVyAe4S2+eCuJFR6qYmyTASbrpf5HWMlnK67WL38Axf6aNuQrdyiZDRXmj/cvx+5lPCwDs0UR/5cNlKuvWW1NPmnF/gcVs=
- NODE_ENV: test
- API_NAME: SERVER-API
- HOST: localhost
- PORT: '5000'
- ENDPOINT: "/api/graphql"
- FRONTEND_URL: http://www.justalk.online
- ENDPOINT_ERD: "/erd"
- ENDPOINT_ADMINBRO: "/admin"
- PASSWORD_ADMINBRO: admin
- USERNAME_ADMINBRO: admin
- SECRET_JWT: TryAgain
- BCRYPT_SALT: 10
- PASSWORD_LIMIT_CHARACTER: 5
- TOKEN_EXPIRE_TIME: 1h
- FORGET_TOKEN_EXPIRE_TIME: 1h
- LOGS: 'FALSE'
- ENCRYPTION_ALGORITHM: aes-256-ctr
- ENCRYPTION_SECRET_KEY: vOVH6sdmpNWjRRIqCc7rdxs01lwHzfr3
- ENCRYPTION_SPLIT: w
- LOGS_CONSOLE: 'FALSE'
- FROM_EMAIL: justal.kevin@gmail.com
- DB_NAME: server_api
- DB_URI_DATA: mongodb://localhost:27017/
- DB_URI_LOG: mongodb://localhost:27017/logs
- DB_HOST_LOG: localhost
- DB_PORT_LOG: 27017
- DB_NAME_LOG: logs
language: node_js
node_js:
- 15
services:
- mongodb
install:
- npm install nyc -g
- npm install
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
> ./cc-test-reporter
- chmod +x ./cc-test-reporter
- "./cc-test-reporter before-build"
addons:
ssh_known_hosts:
- 153.92.5.59
script:
- nyc --reporter=lcov npm run test
after_success:
- npm run coverage
- "./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT"
before_deploy:
- openssl aes-256-cbc -K $encrypted_dfdcfd5172af_key -iv $encrypted_dfdcfd5172af_iv -in deploy_key.enc -out ./deploy_key -d
- eval "$(ssh-agent -s)"
- chmod 600 ./deploy_key
- echo -e "Host 153.92.5.59\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- ssh-add ./deploy_key
deploy:
- provider: script
skip_cleanup: true
script: ssh -i ./deploy_key root@153.92.5.59 "cd /var/www/SERVER-API" && git fetch origin master && git reset --hard FETCH_HEAD && npm install
on:
branch: master