From 525c34bb76424e749fa416a08ed7613f3897df35 Mon Sep 17 00:00:00 2001 From: Matheus Lichtnow Date: Tue, 21 Jan 2020 09:35:04 -0800 Subject: [PATCH] ci(deploy): adds deploy automation do travis-ci --- .travis.yml | 53 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7ae7184..4b7880b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,21 +3,38 @@ language: node_js os: - linux -cache: - directories: - - node_modules - -node_js: - - 12 - - 10 - -install: - - npm install - - npm run snyk - -before_script: - - npm run lint - - npm run build - -script: - - npm test +jobs: + include: + - stage: Testing (node 12) + node_js: 12 + if: type = pull_request + before_script: + - npm run lint + - npm run build + install: + - npm install + - npm run snyk + script: + - npm test + - stage: Testing (node 10) + node_js: 10 + if: type = pull_request + before_script: + - npm run lint + - npm run build + install: + - npm install + - npm run snyk + script: + - npm test + - stage: release + node_js: 12 + if: branch = master AND type = push + script: skip + install: + - npm install + - npm run build + deploy: + provider: script + cleanup: true + script: npx semantic-release