fix: 尝试使用 travis 构建

This commit is contained in:
Zhicheng WANG 2019-01-02 22:05:38 +08:00
parent 2192a1a3cf
commit eba5f6b738
2 changed files with 11 additions and 52 deletions

View File

@ -2,65 +2,24 @@ language: node_js
sudo: false sudo: false
dist: trusty dist: trusty
node_js: node_js:
- '10.9.0' - 10.9.0
addons: addons:
# firefox: "38.0"
apt: apt:
sources: sources:
# needed to install g++ that is used by npms's native modules - ubuntu-toolchain-r-test
- ubuntu-toolchain-r-test
packages: packages:
# needed to install g++ that is used by npms's native modules - g++-4.8
- g++-4.8
branches: branches:
except: except:
- g3 - g3
cache: cache:
yarn: true yarn: true
directories: directories:
- ./node_modules - "./node_modules"
- ./.chrome/chromium - "./.chrome/chromium"
- ./aio/node_modules - "./aio/node_modules"
env:
global:
# GITHUB_TOKEN_ANGULAR=<github token, a personal access token of the angular-builds account, account access in valentine>
# This is needed for the e2e Travis matrix task to publish packages to github for continuous packages delivery.
- secure: "aCdHveZuY8AT4Jr1JoJB4LxZsnGWRe/KseZh1YXYe5UtufFCtTVHvUcLn0j2aLBF0KpdyS+hWf0i4np9jthKu2xPKriefoPgCMpisYeC0MFkwbmv+XlgkUbgkgVZMGiVyX7DCYXVahxIoOUjVMEDCbNiHTIrfEuyq24U3ok2tHc="
matrix:
# Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete.
- CI_MODE=e2e
- CI_MODE=js
- CI_MODE=saucelabs_required
# deactivated, see #19768
# - CI_MODE=browserstack_required
# We disable these optional jobs because those acquire tunnel and browser instances which
# could lead to rate limit excess while those are failing most of the time and nobody pays
# attention anyway.
# - CI_MODE=saucelabs_optional
# - CI_MODE=browserstack_optional
matrix:
fast_finish: true
allow_failures:
- env: "CI_MODE=saucelabs_optional"
- env: "CI_MODE=browserstack_optional"
before_install: before_install:
# source the env.sh script so that the exported variables are available to other scripts later on - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.10.1
- source ./scripts/ci/env.sh print - export PATH="$HOME/.yarn/bin:$PATH"
install:
- ./scripts/ci/install.sh
script: script:
- ./scripts/ci/build.sh - "./aio/deploy-cn.sh"
- ./scripts/ci/test.sh
- ./scripts/ci/angular.sh
# all the scripts under this line will not quickly abort in case ${TRAVIS_TEST_RESULT} is 1 (job failure)
- ./scripts/ci/cleanup.sh
- ./scripts/ci/print-logs.sh

View File

@ -13,7 +13,7 @@ ts-node ./tools/translator/bin/ssr.ts
if [[ ! -d "./ng-docs.github.io" ]] if [[ ! -d "./ng-docs.github.io" ]]
then then
git clone git@github.com:ng-docs/ng-docs.github.io.git ./ng-docs.github.io git clone https://asnowwolf:${GITHUB_ACCESS_TOKEN}@github.com/ng-docs/ng-docs.github.io.git ./ng-docs.github.io
fi fi
cp -r dist/* ./ng-docs.github.io cp -r dist/* ./ng-docs.github.io