-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): run tests and build with current, latest and beta ng version (
- Loading branch information
Showing
6 changed files
with
166 additions
and
27 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 |
---|---|---|
@@ -1,38 +1,96 @@ | ||
sudo: false | ||
language: node_js | ||
node_js: "8" | ||
dist: precise | ||
|
||
notifications: | ||
email: false | ||
|
||
git: | ||
depth: 3 | ||
submodules: false | ||
|
||
env: | ||
global: | ||
- SAUCE_USERNAME=valorkin | ||
- SAUCE_ACCESS_KEY=aeaf806e-ad5c-484b-a8fe-4b4b9f54e99a | ||
|
||
stages: | ||
- name: precache | ||
if: ( branch = development AND type = push ) OR type = pull_request | ||
- name: lint | ||
if: ( branch = development AND type = push ) OR type = pull_request | ||
- name: test | ||
if: ( branch = development AND type = push ) OR type = pull_request | ||
- name: build | ||
if: ( branch = development AND type = push ) OR type = pull_request | ||
- name: deploy-surge | ||
if: branch = development AND type = push | ||
|
||
before_install: | ||
- export CHROME_BIN=chromium-browser | ||
- export DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start | ||
|
||
script: | ||
- npm run lint | ||
- npm run build | ||
- rm -rf node_modules/ngx-bootstrap | ||
- npm i ./dist | ||
- npm run demo.ng-build | ||
# istanbul is broken, should be fixed | ||
- npm run test-coverage | ||
|
||
after_success: | ||
- ./node_modules/.bin/codecov | ||
#- npm run test-cross | ||
|
||
addons: | ||
# sauce labs tunel connector (read more https://docs.travis-ci.com/user/sauce-connect/ ) | ||
sauce_connect: true | ||
firefox: "latest" | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
# required by node-gyp to build some packages | ||
packages: | ||
- g++-4.8 | ||
|
||
install: | ||
- npm install > /dev/null | ||
- npm run build > /dev/null | ||
- if [[ "$NGV" == "latest" ]]; then ./scripts/ci/npm-ng-latest.sh; fi | ||
- if [[ "$NGV" == "next" ]]; then ./scripts/ci/npm-ng-next.sh; fi | ||
- npm i ./dist > /dev/null | ||
|
||
jobs: | ||
fast_finish: true | ||
allow_failures: | ||
- env: NGV=next | ||
include: | ||
# precache npm and apt dependencies | ||
- stage: precache | ||
install: npm install > /dev/null | ||
script: true | ||
addons: | ||
# sauce labs tunel connector (read more https://docs.travis-ci.com/user/sauce-connect/ ) | ||
# sauce_connect: true | ||
chrome: stable | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
# required by node-gyp to build some packages | ||
packages: | ||
- g++-4.8 | ||
# lint code | ||
- stage: lint | ||
install: true | ||
script: npm run lint | ||
# test | ||
- &test | ||
stage: test | ||
script: npm run test-coverage | ||
after_success: | ||
- ./node_modules/.bin/codecov | ||
- <<: *test | ||
env: NGV=latest | ||
- <<: *test | ||
env: NGV=next | ||
# check prod build | ||
- &build | ||
stage: build | ||
script: npm run demo.ng-build | ||
- <<: *build | ||
env: NGV=latest | ||
- <<: *build | ||
env: NGV=next | ||
# deploy to ngx-bootstrap.surge.sh | ||
- stage: deploy-surge | ||
script: npm run demo.build | ||
deploy: | ||
provider: surge | ||
project: ./gh-pages/ | ||
domain: ngx-bootstrap.surge.sh | ||
on: development | ||
|
||
cache: | ||
apt: true | ||
npm: true | ||
directories: | ||
- node_modules |
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,38 @@ | ||
sudo: false | ||
language: node_js | ||
node_js: "8" | ||
dist: precise | ||
|
||
env: | ||
global: | ||
- SAUCE_USERNAME=valorkin | ||
- SAUCE_ACCESS_KEY=aeaf806e-ad5c-484b-a8fe-4b4b9f54e99a | ||
|
||
before_install: | ||
- export CHROME_BIN=chromium-browser | ||
- export DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start | ||
|
||
script: | ||
- npm run lint | ||
- npm run build | ||
- rm -rf node_modules/ngx-bootstrap | ||
- npm i ./dist | ||
- npm run demo.ng-build | ||
# istanbul is broken, should be fixed | ||
- npm run test-coverage | ||
|
||
after_success: | ||
- ./node_modules/.bin/codecov | ||
#- npm run test-cross | ||
|
||
addons: | ||
# sauce labs tunel connector (read more https://docs.travis-ci.com/user/sauce-connect/ ) | ||
sauce_connect: true | ||
firefox: "latest" | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
# required by node-gyp to build some packages | ||
packages: | ||
- g++-4.8 |
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
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,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
npm i @angular/cli@latest \ | ||
@angular/common@latest \ | ||
@angular/compiler@latest \ | ||
@angular/compiler-cli@latest \ | ||
@angular/core@latest \ | ||
@angular/forms@latest \ | ||
@angular/http@latest \ | ||
@angular/language-service@latest \ | ||
@angular/platform-browser@latest \ | ||
@angular/platform-browser-dynamic@latest \ | ||
@angular/router@latest \ | ||
@angular/service-worker@latest \ | ||
@angular/tsc-wrapped@latest \ |
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,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
npm i @angular/[email protected] \ | ||
@angular/[email protected] \ | ||
@angular/[email protected] \ | ||
@angular/[email protected] \ | ||
@angular/[email protected] \ | ||
@angular/[email protected] \ | ||
@angular/[email protected] \ | ||
@angular/[email protected] \ | ||
@angular/[email protected] \ | ||
@angular/[email protected] \ | ||
@angular/[email protected] \ | ||
@angular/[email protected] \ | ||
@angular/[email protected] \ |
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,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
npm i @angular/common@next \ | ||
@angular/compiler@next \ | ||
@angular/compiler-cli@next \ | ||
@angular/core@next \ | ||
@angular/forms@next \ | ||
@angular/http@next \ | ||
@angular/language-service@next \ | ||
@angular/platform-browser@next \ | ||
@angular/platform-browser-dynamic@next \ | ||
@angular/router@next \ | ||
@angular/tsc-wrapped@next \ |