Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Commit

Permalink
chore(travis, node): cleanup browser providers (#157)
Browse files Browse the repository at this point in the history
*  Cleans the browser-providers and the karma configuration
*  Removes unused dependencies (more coming in a follow-up)
*  Travis now runs against Node LTS
*  Fixes duplicate property in tsconfig
  • Loading branch information
devversion authored and ThomasBurleson committed Feb 3, 2017
1 parent 8335bb5 commit aaeb525
Show file tree
Hide file tree
Showing 11 changed files with 439 additions and 546 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: node_js
sudo: false

node_js:
- 'node'
- '6.9.4'

branches:
only:
Expand Down Expand Up @@ -43,5 +43,4 @@ after_success:
cache:
yarn: true
directories:
- node_modules
- $HOME/.pub-cache
- node_modules
34 changes: 6 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@angular/flex-layout",
"name": "flex-layout-srcs",
"version": "2.0.0-beta.4",
"description": "Angular Flex Layouts",
"description": "Angular Flex Layout Sources",
"main": "index.js",
"repository": {
"type": "git",
Expand Down Expand Up @@ -29,8 +29,7 @@
"start": "concurrently \"npm run dev\" \"npm run open\"",
"tslint": "gulp lint",
"test": "gulp test",
"stylelint": "gulp lint",
"webdriver-manager": "webdriver-manager"
"stylelint": "gulp lint"
},
"license": "MIT",
"engines": {
Expand All @@ -43,9 +42,7 @@
"@angular/platform-browser": "^2.2.3",
"@angular/platform-browser-dynamic": "^2.2.3",
"@types/gulp-util": "^3.0.30",
"ace-builds": "^1.2.5",
"core-js": "^2.4.1",
"es-module-loader": "^1.3.5",
"reflect-metadata": "^0.1.8",
"rxjs": "^5.0.1",
"systemjs": "^0.19.41",
Expand All @@ -60,8 +57,6 @@
"@angular/router": "~3.1.1",
"@angular/tsc-wrapped": "~0.4.0",
"@angularclass/conventions-loader": "^1.0.2",
"@angularclass/hmr": "~1.2.0",
"@angularclass/hmr-loader": "~3.0.2",
"@angularclass/request-idle-callback": "^1.0.7",
"@angularclass/webpack-toolkit": "^1.3.3",
"@types/core-js": "^0.9.34",
Expand All @@ -72,18 +67,15 @@
"@types/merge2": "0.0.28",
"@types/minimist": "^1.1.28",
"@types/node": "^6.0.45",
"@types/protractor": "^1.5.20",
"@types/run-sequence": "0.0.27",
"@types/rx": "^2.5.33",
"@types/selenium-webdriver": "2.44.29",
"@types/source-map": "^0.1.27",
"@types/uglify-js": "^2.0.27",
"@types/webpack": "^1.12.34",
"angular-in-memory-web-api": "~0.1.13",
"angular2-template-loader": "^0.6.0",
"assets-webpack-plugin": "^3.4.0",
"awesome-typescript-loader": "3.0.0-beta.9",
"babel-core": "^6.18.2",
"browserstacktunnel-wrapper": "^2.0.0",
"clang-format": "^1.0.45",
"concurrently": "^2.2.0",
Expand All @@ -102,32 +94,26 @@
"gulp-cli": "^1.2.2",
"gulp-conventional-changelog": "^1.1.0",
"gulp-server-livereload": "^1.8.2",
"gulp-shell": "^0.5.2",
"gulp-sourcemaps": "^1.6.0",
"gulp-typescript": "^2.13.6",
"hammerjs": "~2.0.8",
"html-loader": "^0.4.3",
"html-webpack-plugin": "^2.22.0",
"imports-loader": "^0.6.5",
"jasmine-core": "^2.4.1",
"karma": "^1.3.0",
"karma-browserstack-launcher": "^1.0.1",
"karma-browserstack-launcher": "^1.2.0",
"karma-chrome-launcher": "^2.0.0",
"karma-coverage": "^1.1.1",
"karma-firefox-launcher": "^1.0.0",
"karma-jasmine": "^1.0.2",
"karma-mocha-reporter": "^2.0.0",
"karma-remap-coverage": "^0.1.1",
"karma-safari-launcher": "^1.0.0",
"karma-sauce-launcher": "^1.0.0",
"karma-sauce-launcher": "^1.1.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "1.8.1",
"madge": "^1.4.4",
"merge2": "^1.0.2",
"minimist": "^1.2.0",
"null-loader": "^0.1.1",
"opn-cli": "^3.1.0",
"parse5": "^2.2.2",
"prompt-sync": "^4.1.4",
"raw-loader": "^0.5.1",
"reflect-metadata": "^0.1.8",
Expand All @@ -138,26 +124,18 @@
"run-sequence": "^1.2.2",
"sass": "^0.5.0",
"source-map-loader": "^0.1.5",
"strip-ansi": "^3.0.0",
"style-loader": "^0.13.1",
"stylelint": "^7.5.0",
"symlink-or-copy": "^1.0.1",
"travis-after-modes": "0.0.7",
"ts-helpers": "1.1.2",
"ts-node": "^0.7.3",
"tslint": "^4.2.0",
"tslint-loader": "^3.3.0",
"typedoc": "^0.5.0",
"typescript": "2.0.10",
"url-loader": "^0.5.7",
"webpack": "2.2.0-rc.3",
"webpack-bundle-analyzer": "^2.2.0",
"webpack-dev-middleware": "^1.9.0",
"webpack-dev-server": "^2.2.0-rc.0",
"webpack-livereload-plugin": "^0.9.0",
"webpack-md5-hash": "^0.0.5",
"webpack-merge": "^2.0.0",
"webpack-node-externals": "^1.5.4",
"which": "^1.2.4"
"webpack-livereload-plugin": "^0.9.0"
}
}
10 changes: 4 additions & 6 deletions src/lib/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
{
"compilerOptions": {
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"declaration": true,
"inlineSources": true,
"skipDefaultLibCheck":true,
"noImplicitAny": true,
"skipDefaultLibCheck": true,
"noImplicitAny": false,
"noImplicitReturns": true,
"suppressImplicitAnyIndexErrors": true,
"stripInternal": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noImplicitAny": false,

"mapRoot": "",
"rootDir": ".",
"sourceMap": true,
Expand Down
4 changes: 2 additions & 2 deletions tools/gulp/tasks/unit-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import gulp = require('gulp');
import path = require('path');
import gulpMerge = require('merge2');

import {PROJECT_ROOT, DIST_COMPONENTS_ROOT} from '../constants';
import {PROJECT_ROOT} from '../constants';
import {sequenceTask} from '../task_helpers';

const karma = require('karma');
Expand Down Expand Up @@ -71,5 +71,5 @@ function onKarmaFinished(doneFn: (error?: Error) => void) {
// Immediately exit the process if Karma reported errors, because due to
// potential running Saucelabs browsers gulp won't exit properly.
exitCode === 0 ? doneFn() : process.exit(exitCode);
}
};
}
2 changes: 1 addition & 1 deletion tools/scripts/browserstack/start_tunnel.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var HOSTNAME = 'localhost';
var PORTS = [9876, 9877];
var ACCESS_KEY = process.env.BROWSER_STACK_ACCESS_KEY;
var READY_FILE = process.env.BROWSER_PROVIDER_READY_FILE;
var TUNNEL_IDENTIFIER = process.env.TRAVIS_JOB_NUMBER;
var TUNNEL_IDENTIFIER = process.env.TRAVIS_JOB_ID;

// We need to start fake servers, otherwise the tunnel does not start.
var fakeServers = [];
Expand Down
4 changes: 2 additions & 2 deletions tools/scripts/sauce/sauce_connect_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ SAUCE_ACCESS_KEY=`echo $SAUCE_ACCESS_KEY | rev`
ARGS=""

# Set tunnel-id only on Travis, to make local testing easier.
if [ ! -z "$TRAVIS_JOB_NUMBER" ]; then
ARGS="$ARGS --tunnel-identifier $TRAVIS_JOB_NUMBER"
if [ ! -z "$TRAVIS_JOB_ID" ]; then
ARGS="$ARGS --tunnel-identifier $TRAVIS_JOB_ID"
fi
if [ ! -z "$BROWSER_PROVIDER_READY_FILE" ]; then
ARGS="$ARGS --readyfile $BROWSER_PROVIDER_READY_FILE"
Expand Down
66 changes: 66 additions & 0 deletions tools/test/browser-providers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
'use strict';

/*
* Browser Configuration for the different jobs in the CI.
* Target can be either: BS (Browserstack) | SL (Saucelabs) | null (To not run at all)
*/
const browserConfig = {
'Chrome': { unitTest: {target: 'SL', required: true }},
'Firefox': { unitTest: {target: 'SL', required: true }},
'ChromeBeta': { unitTest: {target: null, required: false }},
'FirefoxBeta': { unitTest: {target: null, required: false }},
'ChromeDev': { unitTest: {target: null, required: true }},
'FirefoxDev': { unitTest: {target: null, required: true }},
'IE9': { unitTest: {target: null, required: false }},
'IE10': { unitTest: {target: null, required: true }},
'IE11': { unitTest: {target: 'BS', required: true }},
'Edge': { unitTest: {target: 'BS', required: true }},
'Android4.1': { unitTest: {target: null, required: false }},
'Android4.2': { unitTest: {target: null, required: false }},
'Android4.3': { unitTest: {target: null, required: false }},
'Android4.4': { unitTest: {target: null, required: false }},
'Android5': { unitTest: {target: 'SL', required: false }},
'Safari7': { unitTest: {target: null, required: false }},
'Safari8': { unitTest: {target: null, required: false }},
'Safari9': { unitTest: {target: 'BS', required: false }},
'Safari10': { unitTest: {target: 'BS', required: false }},
'iOS7': { unitTest: {target: null, required: false }},
'iOS8': { unitTest: {target: null, required: false }},
'iOS9': { unitTest: {target: 'SL', required: false }},
'WindowsPhone': { unitTest: {target: 'BS', required: false }}
};

/** Exports all available remote browsers. */
exports.customLaunchers = require('./remote_browsers.json');

/** Exports a map of configured browsers, which should run on the CI. */
exports.platformMap = {
'saucelabs': {
required: buildConfiguration('unitTest', 'SL', true),
optional: buildConfiguration('unitTest', 'SL', false)
},
'browserstack': {
required: buildConfiguration('unitTest', 'BS', true),
optional: buildConfiguration('unitTest', 'BS', false)
}
};

/** Build a list of configuration (custom launcher names). */
function buildConfiguration(type, target, required) {
return Object.keys(browserConfig)
.map(item => [item, browserConfig[item][type]])
.filter(([, conf]) => conf.required === required && conf.target === target)
.map(([item]) => `${target}_${item.toUpperCase()}`);
}

/** Decode the token for Travis to use. */
function decodeToken(token) {
return (token || '').split('').reverse().join('');
}


/** Ensures that the Travis access keys work properly. */
if (process.env.TRAVIS) {
process.env.SAUCE_ACCESS_KEY = decodeToken(process.env.SAUCE_ACCESS_KEY);
process.env.BROWSER_STACK_ACCESS_KEY = decodeToken(process.env.BROWSER_STACK_ACCESS_KEY);
}
Loading

0 comments on commit aaeb525

Please sign in to comment.