Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): improve continuous integration
Continuous integration improvements - Travis builds no longer run on non-master branch pushes - TravisBuddy integration - Unit tests (code correctness) and validation checks (everything else) run in parallel - add semantic-release to automate publishing once PRs merge - add commitlint as part of travis build
- Loading branch information
Eric Fischer
committed
Apr 24, 2018
1 parent
cb96fba
commit 5b09057
Showing
9 changed files
with
4,549 additions
and
2,555 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["@commitlint/config-angular"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"branch": master", | ||
"tagFormat": "v${version}", | ||
"verifyConditions": [ | ||
"@semantic-release/npm", | ||
{ | ||
"path": "@semantic-release/github", | ||
"assets": { | ||
"path": "dist/*" | ||
} | ||
} | ||
], | ||
"analyzeCommits": "@semantic-release/commit-analyzer", | ||
"generateNotes": "@semantic-release/release-notes-generator", | ||
"prepare": "@semantic-release/npm", | ||
"publish": [ | ||
"@semantic-release/npm", | ||
{ | ||
"path": "@semantic-release/github", | ||
"assets": { | ||
"path": "dist/*" | ||
} | ||
} | ||
], | ||
"success": [], | ||
"fail": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,36 @@ | ||
language: node_js | ||
|
||
node_js: | ||
- 8.9.4 | ||
|
||
branches: | ||
only: | ||
- master | ||
- /v\d+\.\d+\.d+$/ | ||
|
||
cache: | ||
directory: | ||
- studio-frontend/node_modules/ | ||
directories: | ||
- "node_modules" | ||
|
||
script: | ||
- make package-lock.validate | ||
- make i18n.pre_validate | ||
- npm run lint | ||
- npm run test | ||
stages: | ||
- PR checks ✅ | ||
- name: Ship It 🚢 | ||
if: env(TRAVIS_BRANCH) = master | ||
jobs: | ||
include: | ||
- stage: PR checks ✅ | ||
env: | ||
- NAME=Unit Tests | ||
script: npm run test | ||
after_script: | ||
- codecov | ||
- stage: PR checks ✅ | ||
env: | ||
- NAME=Validation Checks | ||
script: ./.travis/validate_changes_for_merge.sh | ||
- stage: Ship It 🚢 | ||
env: | ||
- NAME=Publish | ||
script: rm -rf dist/ && rm -rf node_modules/ && npm install && npm run build && semantic-release | ||
|
||
after_script: | ||
- codecov | ||
notifications: | ||
webhooks: https://www.travisbuddy.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
# This script exists so that all validation checks can be run in parallel with a single compound exit status | ||
|
||
EXIT_STATUS=0 | ||
npm run lint || EXIT_STATUS=$? | ||
make package-lock.validate || EXIT_STATUS=$? | ||
make i18n.pre_validate || EXIT_STATUS=$? | ||
commitlint-travis || EXIT_STATUS=$? | ||
exit $EXIT_STATUS |
Oops, something went wrong.