build: move typings_test to new integration test fixture (#14149)

PR Close #14149
This commit is contained in:
Alex Eagle 2017-01-26 19:49:44 -08:00 committed by Miško Hevery
parent 49fb8143e8
commit c48dd76f5c
6 changed files with 33 additions and 26 deletions

View File

@ -151,6 +151,9 @@ do
if [[ -e ${SRCDIR}/tsconfig-testing.json ]]; then
echo "====== COMPILING TESTING: ${TSC} -p ${SRCDIR}/tsconfig-testing.json"
$TSC -p ${SRCDIR}/tsconfig-testing.json
if [[ -n "${EXPERIMENTAL_ES2015_DISTRO}" ]]; then
$TSC -p ${SRCDIR}/tsconfig-testing.json --target es2015 --outDir ${ES2015_DESTDIR}
fi
fi
if [[ -e ${SRCDIR}/tsconfig-2015.json ]]; then

View File

@ -0,0 +1,27 @@
{
"name": "angular-integration",
"description": "Assert that users with TypeScript 2.0 can type-check an Angular application",
"version": "0.0.0",
"license": "MIT",
"dependencies": {
"@angular/common": "file:../../dist/packages-dist-es2015/common",
"@angular/compiler": "file:../../dist/packages-dist-es2015/compiler",
"@angular/compiler-cli": "file:../../dist/packages-dist-es2015/compiler-cli",
"@angular/core": "file:../../dist/packages-dist-es2015/core",
"@angular/http": "file:../../dist/packages-dist-es2015/http",
"@angular/platform-browser": "file:../../dist/packages-dist-es2015/platform-browser",
"@angular/platform-browser-dynamic": "file:../../dist/packages-dist-es2015/platform-browser-dynamic",
"@angular/platform-server": "file:../../dist/packages-dist-es2015/platform-server",
"@angular/router": "file:../../dist/packages-dist-es2015/router",
"@angular/tsc-wrapped": "file:../../dist/tools/@angular/tsc-wrapped",
"@angular/upgrade": "file:../../dist/packages-dist-es2015/upgrade",
"@types/jasmine": "^2.5.41",
"rxjs": "file:../../node_modules/rxjs",
"source-map-explorer": "^1.3.3",
"typescript": "~2.0",
"zone.js": "^0.7.6"
},
"scripts": {
"test": "tsc"
}
}

View File

@ -7,7 +7,8 @@
"outDir": "../../dist/typing-test/",
"rootDir": ".",
"target": "es5",
"lib": ["es5", "dom", "es2015.collection", "es2015.iterable", "es2015.promise"]
"lib": ["es5", "dom", "es2015.collection", "es2015.iterable", "es2015.promise"],
"types": []
},
"files": [
"include-all.ts",

View File

@ -23,9 +23,8 @@ echo 'travis_fold:end:test.buildPackages'
./integration/build_rxjs_es6.sh
./integration/run_tests.sh
#TODO(alexeagle): move offline_compiler_test and typings-test to integration/
#TODO(alexeagle): move offline_compiler_test to integration/
./scripts/ci-lite/offline_compiler_test.sh
./tools/typings-test/test.sh
$(npm bin)/gulp public-api:enforce

View File

@ -1,23 +0,0 @@
#!/usr/bin/env bash
set -ex -o pipefail
# These ones can be `npm link`ed for fast development
# Note that compiler-cli does not support TS 1.8 because tsc-wrapped uses 1.9 features
LINKABLE_PKGS=(
$(pwd)/dist/packages-dist/{common,core,compiler,http,router,upgrade,platform-{browser,browser-dynamic,server}}
)
TMPDIR=${TMPDIR:-/tmp/angular-build/}
readonly TMP=$TMPDIR/typings-test.$(date +%s)
mkdir -p $TMP
cp -R -v tools/typings-test/* $TMP
# run in subshell to avoid polluting cwd
(
cd $TMP
# create package.json so that npm install doesn't pollute any parent node_modules's directory
npm init --yes
npm install ${LINKABLE_PKGS[*]} @types/jasmine rxjs@5.0 zone.js@0.7 typescript@2.0.2
$(npm bin)/tsc --version
$(npm bin)/tsc -p tsconfig.json
)