mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-01-11 02:37:22 +03:00
Split all scripts in travis build into individual jobs
This commit is contained in:
parent
59d23b584a
commit
984e9f32a5
1 changed files with 32 additions and 32 deletions
42
.travis.yml
42
.travis.yml
|
@ -6,37 +6,37 @@ branches:
|
||||||
only:
|
only:
|
||||||
- /.*/
|
- /.*/
|
||||||
|
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- node_modules
|
- node_modules
|
||||||
|
|
||||||
|
node_js:
|
||||||
|
- '12.16.3'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
- node_js: '12.16.3'
|
- name: 'Lint'
|
||||||
|
install: npm ci
|
||||||
install:
|
script: npm run lint
|
||||||
- npm ci
|
- name: 'Unit tests'
|
||||||
|
install: npm ci
|
||||||
|
script: npm run test:ci
|
||||||
|
after_success:
|
||||||
|
- node_modules/.bin/ocular coverage/clover.xml
|
||||||
|
- name: 'Mutation tests'
|
||||||
|
install: npm ci
|
||||||
before_script:
|
before_script:
|
||||||
- echo "Building commit range ${TRAVIS_COMMIT_RANGE}"
|
- 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 ",")
|
- export MUTATION_FILES=$(git diff ${TRAVIS_COMMIT_RANGE:-origin/main} --name-only | grep -E 'src\/(.*).(ts|tsx)$' | paste -sd ",")
|
||||||
|
script: npm run mutate:ci
|
||||||
script:
|
- name: 'Build docker image'
|
||||||
- npm run lint
|
services:
|
||||||
- npm run test:ci
|
- docker
|
||||||
- docker build -t shlink-web-client:test .
|
script: docker build -t shlink-web-client:test .
|
||||||
- npm run mutate:ci
|
- name: 'Publish release'
|
||||||
|
if: tag IS present
|
||||||
after_success:
|
before_deploy: npm run build ${TRAVIS_TAG#?} # Before deploying, build dist file for current travis tag
|
||||||
- node_modules/.bin/ocular coverage/clover.xml
|
|
||||||
|
|
||||||
# Before deploying, build dist file for current travis tag
|
|
||||||
before_deploy: npm run build ${TRAVIS_TAG#?}
|
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
- provider: releases
|
- provider: releases
|
||||||
api_key:
|
api_key:
|
||||||
|
|
Loading…
Reference in a new issue