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