-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
61 lines (61 loc) · 1.51 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
sudo: required
services:
- docker
- mongodb
language: node_js # latest stable Node.js release
node_js:
# - lts/* #latest LTS Node.js release
- 12
branches:
only:
- cicd
# - /^greenkeeper/.*$/
cache:
directories:
- node_modules
# yarn: true
env:
global:
- ACCESS_TOKEN_SECRET=chnirt1803
# - DOCKER_USERNAME=chnirt
# - DOCKER_PASSWORD=12345678
before_install:
# - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.15.2
# - export PATH="$HOME/.yarn/bin:$PATH"
install:
- npm i
- npm rebuild bcrypt --update-binary
- npm i -g codecov
script:
- istanbul cover ./node_modules/mocha/bin/_mocha --reporter lcovonly -- -R spec
- codecov
stages:
# - build docker image
- Unit Tests
- E2e Tests
- Coverage Tests
# - UI Tests
# - Deploy
jobs:
include:
# - stage: build docker image
# script:
# - echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
# - docker build -t travis-ci-build-stages-demo .
# - docker images
# - docker tag travis-ci-build-stages-demo $DOCKER_USERNAME/travis-ci-build-stages-demo
# - docker push $DOCKER_USERNAME/travis-ci-build-stages-demo
- stage: Unit Tests
script:
- npm run gen
- npm run test
- stage: E2e Tests
script:
- npm run gen
- npm run test:e2e
- stage: Coverage Tests
script:
- npm run gen
- npm run test:cov
after_script:
- COVERALLS_REPO_TOKEN=$coveralls_repo_token npm run coveralls