2018-08-04 11:29:55 +03:00
|
|
|
language: node_js
|
|
|
|
|
|
|
|
node_js:
|
2020-01-28 20:40:33 +03:00
|
|
|
- "12.14.1"
|
2018-08-04 11:29:55 +03:00
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- node_modules
|
|
|
|
|
2019-03-03 12:22:26 +03:00
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
|
2018-08-04 11:29:55 +03:00
|
|
|
install:
|
2019-04-14 22:58:10 +03:00
|
|
|
- npm ci
|
2018-08-04 11:29:55 +03:00
|
|
|
|
2019-04-22 11:04:41 +03:00
|
|
|
before_script:
|
2019-04-22 20:13:02 +03:00
|
|
|
- echo "Building commit range ${TRAVIS_COMMIT_RANGE}"
|
2020-01-14 22:48:01 +03:00
|
|
|
- export MUTATION_FILES=$(git diff ${TRAVIS_COMMIT_RANGE:-origin/master} --name-only | grep -E 'src\/(.*).(js|ts|jsx|tsx)$' | paste -sd ",")
|
2019-04-22 11:04:41 +03:00
|
|
|
|
2018-08-04 11:29:55 +03:00
|
|
|
script:
|
2019-04-14 22:58:10 +03:00
|
|
|
- npm run lint
|
|
|
|
- npm run test:ci
|
2020-03-19 22:26:35 +03:00
|
|
|
- if [[ $TRAVIS_PULL_REQUEST != 'false' ]]; then docker build -t shlink-web-client:test . ; fi
|
|
|
|
- if [[ $TRAVIS_PULL_REQUEST != 'false' ]]; then npm run mutate:ci ; fi
|
2018-08-04 11:29:55 +03:00
|
|
|
|
2018-10-07 10:09:40 +03:00
|
|
|
after_success:
|
2019-04-14 22:58:10 +03:00
|
|
|
- node_modules/.bin/ocular coverage/clover.xml
|
2018-08-22 11:44:24 +03:00
|
|
|
|
2018-10-07 10:09:40 +03:00
|
|
|
# Before deploying, build dist file for current travis tag
|
|
|
|
before_deploy:
|
2019-04-14 22:58:10 +03:00
|
|
|
- npm run build ${TRAVIS_TAG#?}
|
2018-10-07 10:09:40 +03:00
|
|
|
|
|
|
|
deploy:
|
2020-03-19 22:04:21 +03:00
|
|
|
- provider: script
|
|
|
|
script: bash ./scripts/docker/build
|
|
|
|
on:
|
|
|
|
branch: master
|
|
|
|
- provider: releases
|
|
|
|
api_key:
|
|
|
|
secure: jBvPwC7EAbViaNR83rwMSt5XQDK0Iu9rgvEMa7GoyShbHcvUCCPd73Tu9quNpKi6NKsDY3INHgtch3vgonjGNGDGJ+yDyIBzXcvsAX2x3UcHpRbgY12uiINVmQxBI1+OVQB016Nm+cKC/i5Z36K4EmDbYfo+MrKndngM6AjcQFTwI8EwniIMaQgg4gNes//K8NhP5u0c3gwG+Q6jEGnq6uH3kcRgh6/epIZYpQyxjqWqKwF77sgcYj+X2Nf6XxtB5neuCi301UKLoLx8G0skh/Lm6KAIO4s9iIhIFa3UpoF21Ka0TxLpd2JxalLryCnFGlWWE6lxC9Htmc0TeRowJQlGdJXCskJ37xT9MljKY0fwNMu06VS/FUgykuCv+jP3zQu51pKu7Ew7+WeNPjautoOTu54VkdGyHcf2ThBNEyJQuiEwAQe4u7yAxY6R5ovEdvHBSIg4w1E5/Mxy5SMTCUlIAv6H7QQ1X9Z/zJm9HH5KeKz5tsHvQ/RIdSpgHXq/tC8o4Yup/LCFucXfrgvy/8pJoO1UpOlmvm62974NFfo0EG5YWwv6brUqz3QXpMjb8sWqgjltYMYJX3J7WZ34rIc+zt4NAmfhqgczaOC4pUGCiJ8jX3rMWIaQRn1AJ+5V337jL9fNDpTHny4phQjHrMJ1e0HZuNp0Xb5Q8wgqDPM=
|
|
|
|
file: "./dist/shlink-web-client_${TRAVIS_TAG#?}_dist.zip"
|
|
|
|
skip_cleanup: true
|
|
|
|
on:
|
|
|
|
tags: true
|