Improve TravisCI configuration (#3847)

* Improve '.travis.yml' configuration.

* Add 'cleanup: false' to TravisCI deployments.

* Add 'git.depth: 1' to 'Git tag' job.

* Reorder 'git' key in TravisCI config
This commit is contained in:
Álvaro Mondéjar 2020-11-12 21:58:20 +01:00 committed by GitHub
parent 487a8426c6
commit 65b740ab9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,4 @@
os: linux
language: node_js
jobs:
include:
@ -7,6 +6,8 @@ jobs:
name: "Lint"
language: node_js
node_js: 10
git:
depth: 1
script:
- npm run jsonlint
- npm run svglint
@ -14,7 +15,12 @@ jobs:
- npm run our-lint
- name: "Build website"
language: ruby
rvm: 2.4.1
rvm: 2.5.3
git:
depth: 1
cache:
directories:
- /home/travis/.rvm/
install:
- gem install jekyll
script:
@ -22,12 +28,16 @@ jobs:
- name: "Test package"
language: node_js
node_js: 10
git:
depth: 1
script:
- npm run test
- stage: deploy
- stage: "Deploy"
name: "Git tag"
language: shell
git:
depth: 1
if: branch = master
before_deploy:
@ -38,9 +48,12 @@ jobs:
deploy:
provider: releases
token: "$GITHUB_TOKEN"
cleanup: false
- name: "NPM Package"
language: node_js
node_js: 10
git:
depth: 1
if: branch = master
deploy:
@ -48,6 +61,7 @@ jobs:
provider: npm
email: "$NPM_EMAIL"
api_token: "$NPM_KEY"
cleanup: false
on:
branch: master