forked from o360/frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
24 lines (24 loc) · 736 Bytes
/
.travis.yml
File metadata and controls
24 lines (24 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
language: node_js
node_js: 12.14.0
services: docker
cache:
npm: true
addons:
chrome: stable
install:
- npm ci
script:
- npm run lint
- npm run test
after_success:
- npm run coveralls
before_deploy:
# Note: On tag builds $TRAVIS_BRANCH contains tag name, not branch name
- docker build --tag="$DOCKER_REPOSITORY:$([ "$TRAVIS_BRANCH" == "master" ] && echo "latest" || echo "$TRAVIS_BRANCH")" --file=".docker/Dockerfile" .
- echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin
deploy:
provider: script
script: docker push "$DOCKER_REPOSITORY:$([ "$TRAVIS_BRANCH" == "master" ] && echo "latest" || echo "$TRAVIS_BRANCH")"
on:
all_branches: true
condition: $TRAVIS_PULL_REQUEST = false