2020-05-17 11:02:36 +03:00
|
|
|
dist: bionic
|
|
|
|
|
2018-08-04 11:29:55 +03:00
|
|
|
language: node_js
|
|
|
|
|
2020-06-10 19:43:11 +03:00
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- /.*/
|
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- node_modules
|
|
|
|
|
2020-09-19 17:57:35 +03:00
|
|
|
node_js:
|
|
|
|
- '12.16.3'
|
|
|
|
|
2020-05-17 11:02:36 +03:00
|
|
|
jobs:
|
|
|
|
fast_finish: true
|
2020-09-19 19:08:16 +03:00
|
|
|
allow_failures:
|
|
|
|
- name: 'Mutation tests'
|
2020-05-17 11:02:36 +03:00
|
|
|
include:
|
2020-09-19 19:52:49 +03:00
|
|
|
|
2020-09-19 17:57:35 +03:00
|
|
|
- name: 'Lint'
|
|
|
|
install: npm ci
|
|
|
|
script: npm run lint
|
2020-09-19 19:52:49 +03:00
|
|
|
|
2020-09-19 17:57:35 +03:00
|
|
|
- name: 'Unit tests'
|
|
|
|
install: npm ci
|
|
|
|
script: npm run test:ci
|
|
|
|
after_success:
|
|
|
|
- node_modules/.bin/ocular coverage/clover.xml
|
2020-09-19 19:52:49 +03:00
|
|
|
|
2020-09-19 17:57:35 +03:00
|
|
|
- name: 'Mutation tests'
|
|
|
|
install: npm ci
|
|
|
|
before_script:
|
|
|
|
- echo "Building commit range ${TRAVIS_COMMIT_RANGE}"
|
|
|
|
- export MUTATION_FILES=$(git diff ${TRAVIS_COMMIT_RANGE:-origin/main} --name-only | grep -E 'src\/(.*).(ts|tsx)$' | paste -sd ",")
|
|
|
|
script: npm run mutate:ci
|
2020-09-19 19:52:49 +03:00
|
|
|
|
2020-09-19 17:57:35 +03:00
|
|
|
- name: 'Build docker image'
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
script: docker build -t shlink-web-client:test .
|
2020-09-19 19:52:49 +03:00
|
|
|
|
2020-09-19 17:57:35 +03:00
|
|
|
- name: 'Publish release'
|
|
|
|
if: tag IS present
|
2020-09-20 11:43:21 +03:00
|
|
|
before_deploy: npm run build ${TRAVIS_TAG#?}
|
2020-09-19 17:57:35 +03:00
|
|
|
deploy:
|
2020-09-20 11:43:21 +03:00
|
|
|
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
|