Skip to content

Commit

Permalink
Merge pull request #2 from angular/master
Browse files Browse the repository at this point in the history
Merging changes from material
  • Loading branch information
relair committed Oct 30, 2018
2 parents 76a6397 + a9e550e commit d1dae40
Show file tree
Hide file tree
Showing 355 changed files with 11,414 additions and 11,543 deletions.
1 change: 1 addition & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
37 changes: 20 additions & 17 deletions tools/bazel.rc → .bazelrc
Original file line number Diff line number Diff line change
@@ -1,32 +1,29 @@
###############################
# Directory structure #
# Filesystem interactions #
###############################

# Don't create bazel-* symlinks in the WORKSPACE directory.
# These require .gitignore and may scare users.
# Also, it's a workaround for https://github.com/bazelbuild/rules_typescript/issues/12
# which affects the common case of having `tsconfig.json` in the WORKSPACE directory.
#
# Instead, you should run `bazel info bazel-bin` to find out where the outputs went.
# These require .gitignore and may scare users. Also, it's a workaround for
# https://github.com/bazelbuild/rules_typescript/issues/12 which affects the common case of
# having `tsconfig.json` in the WORKSPACE directory. Instead, you should run
# `bazel info output_base` to find out where the outputs went.
build --symlink_prefix=/

# Another good choice is to create a dist/ directory. Then you can use
# build --symlink_prefix=dist/
# to get folders like dist/bin
# But be aware, this will still create a bazel-out symlink in your project directory.
# You may still need to exclude that, eg. from the editor's search path.
# Performance: avoid stat'ing input files
build --watchfs

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

###############################
# Output #
# Output control #
###############################

# A more useful default output mode for bazel query
# Prints eg. "ng_module rule //foo:bar" rather than just "//foo:bar"
query --output=label_kind

# Don't print every dependency in :node_modules, for example
query --noimplicit_deps

# By default, failing tests don't print any output, it goes to the log file
test --test_output=errors

Expand All @@ -43,9 +40,15 @@ build --workspace_status_command=./tools/bazel-stamp-vars.sh
###############################
# Typescript / Angular / Sass #
###############################
# Make TypeScript and Angular compilation fast, by keeping a few copies of the compiler

# Make compilation fast, by keeping a few copies of the compilers
# running as daemons, and cache SourceFile AST's to reduce parse time.
build --strategy=TypeScriptCompile=worker --strategy=AngularTemplateCompile=worker
build --strategy=TypeScriptCompile=worker
build --strategy=AngularTemplateCompile=worker

################################
# Temporary Settings for Ivy #
################################

# Use the legacy AOT compiler strategy. We don't want to compile with Ivy nor with "ngtsc" which
# does not generate factory files which are needed for AOT.
Expand Down
142 changes: 135 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# Configuration file for https://circleci.com/gh/angular/material2

#
# Note: YAML anchors allow an object to be re-used, reducing duplication.
# The ampersand declares an alias for an object, then later the `<<: *name`
# syntax dereferences it.
# See http://blog.daemonl.com/2016/02/yaml.html
# To validate changes, use an online parser, eg.
# http://yaml-online-parser.appspot.com/

var_1: &docker_image angular/ngcontainer:0.6.0
var_2: &cache_key v2-ng-mat-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.6.0
var_1: &docker_image angular/ngcontainer:0.7.0
var_2: &cache_key v2-ng-mat-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.7.0

# Settings common to each job
var_3: &job_defaults
Expand Down Expand Up @@ -53,6 +52,20 @@ var_8: &copy_bazel_config
# Set up the CircleCI specific bazel configuration.
run: sudo cp ./.circleci/bazel.rc /etc/bazel.bazelrc

# Sets up a different Docker image that includes a moe recent Firefox version which
# is needed for headless testing.
var_9: &docker-firefox-image
# TODO(devversion): Temporarily use a image that includes Firefox 62 because the
# ngcontainer image does include an old Firefox version that does not support headless.
# See the PR that fixes this: https://github.com/angular/angular/pull/26435
- image: circleci/node:10.12-browsers

# Attaches the release output which has been stored in the workspace to the current job.
# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
var_10: &attach_release_output
attach_workspace:
at: dist/releases

# -----------------------------
# Container version of CircleCI
# -----------------------------
Expand All @@ -76,10 +89,84 @@ jobs:
- *copy_bazel_config

# TODO(jelbourn): Update this command to run all tests if the Bazel issues have been fixed.
- run: bazel build src/cdk/...
- run: bazel test src/cdk/...
- run: bazel build src/...
- run: bazel test src/...

# ------------------------------------------------------------------------------------------
# Job that runs the unit tests on locally installed browsers (Chrome and Firefox headless).
# The available browsers are installed through the angular/ngcontainer Docker image.
# ------------------------------------------------------------------------------------------
tests_local_browsers:
docker: *docker-firefox-image
resource_class: xlarge
environment:
TEST_PLATFORM: local
steps:
- *checkout_code
- *restore_cache
- *yarn_install

- *save_cache
# Launches the unit tests. The platform is determined by the "TEST_PLATFORM" environment
# variable which has been configured above
- run: yarn gulp ci:test

# ----------------------------------------------------------------
# Job that runs the e2e tests with Protractor and Chrome Headless
# ----------------------------------------------------------------
e2e_tests:
<<: *job_defaults
resource_class: xlarge
steps:
- *checkout_code
- *restore_cache
- *yarn_install

- run: yarn gulp ci:e2e

# ----------------------------------------------------------------------------
# Job that runs the unit tests on Browserstack. The browsers that will be used
# to run the unit tests on Browserstack are set in: test/browser-providers.js
# ----------------------------------------------------------------------------
tests_browserstack:
<<: *job_defaults
resource_class: xlarge
environment:
BROWSER_STACK_USERNAME: "angularteam1"
BROWSER_STACK_ACCESS_KEY: "CaXMeMHD9pr5PHg8N7Jq"
parallelism: 2
steps:
- *checkout_code
- *restore_cache
- *yarn_install

- run: ./scripts/circleci/run-browserstack-tests.sh

# -----------------------------------------------------------------------------------------
# Job that builds the demo-app with AOT. In order to speed up this job, the release output
# from the workspace storage will be attached to this job.
# -----------------------------------------------------------------------------------------
build_demoapp_aot:
<<: *job_defaults
steps:
- *checkout_code
- *restore_cache
- *yarn_install
- *attach_release_output

- run: yarn gulp ci:aot

# -------------------------------------------------------------------------
# Job that pre-render's the universal app with `@angular/platform-server`.
# This verifies that Angular Material can be rendered within Node.
# -------------------------------------------------------------------------
prerender_build:
<<: *job_defaults
steps:
- *checkout_code
- *restore_cache
- *yarn_install

- run: yarn gulp ci:prerender

# ----------------------------------
# Lint job. Runs the gulp lint task.
Expand All @@ -91,13 +178,37 @@ jobs:
- *restore_cache
- *yarn_install

- run: yarn ci:lint
- run: yarn gulp ci:lint

# -------------------------------------------------------------------------------------------
# Job that builds all release packages with Gulp. The built packages can be then used in the
# same workflow to publish snapshot builds or test the demo-app with the release packages.
# -------------------------------------------------------------------------------------------
build_release_packages:
<<: *job_defaults
resource_class: xlarge
steps:
- *checkout_code
- *restore_cache
- *yarn_install

- run: yarn gulp ci:build-release-packages

# Store the release output in the workspace storage. This means that other jobs
# in the same workflow can attach the release output to their job.
- persist_to_workspace:
root: dist/releases
paths:
- "**/*"

- *save_cache

# ----------------------------------------------------------------------------------------
# Workflow definitions. A workflow usually groups multiple jobs together. This is useful if
# one job depends on another.
#
# NOTE: When updating this configuration section, make sure to update GitHub robot
# config to match the new workflow jobs.
# ----------------------------------------------------------------------------------------
workflows:
version: 2
Expand All @@ -108,6 +219,23 @@ workflows:
jobs:
- bazel_build_test

unit_tests:
jobs:
- tests_local_browsers
- tests_browserstack

integration_tests:
jobs:
- e2e_tests
- prerender_build

release_output:
jobs:
- build_release_packages
- build_demoapp_aot:
requires:
- build_release_packages

# Lint workflow. As we want to lint in one job, this is a workflow with just one job.
lint:
jobs:
Expand Down
2 changes: 0 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@
/e2e/components/checkbox-e2e.spec.ts @jelbourn @devversion
/e2e/components/dialog-e2e.spec.ts @jelbourn @crisbeto
/e2e/components/expansion-e2e.spec.ts @josephperrott @jelbourn
/e2e/components/fullscreen-e2e.spec.ts @jelbourn
/e2e/components/grid-list-e2e.spec.ts @jelbourn
/e2e/components/icon-e2e.spec.ts @jelbourn
/e2e/components/input-e2e.spec.ts @mmalerba
Expand All @@ -178,7 +177,6 @@
/src/e2e-app/checkbox/** @jelbourn @devversion
/src/e2e-app/dialog/** @jelbourn @crisbeto
/src/e2e-app/e2e-app/** @jelbourn
/src/e2e-app/fullscreen/** @jelbourn
/src/e2e-app/grid-list/** @jelbourn
/src/e2e-app/icon/** @jelbourn
/src/e2e-app/input/** @mmalerba
Expand Down
4 changes: 3 additions & 1 deletion .github/angular-robot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ merge:
requiredStatuses:
# TODO(josephperrott): reenable once CI flakiness is addressed
# - "continuous-integration/travis-ci/pr"
- "ci/circleci: build"
- "ci/circleci: lint"
- "ci/circleci: bazel_build_test"
- "ci/circleci: tests_local_browsers"

# the comment that will be added when the merge label is added despite failing checks, leave empty or set to false to disable
# {{MERGE_LABEL}} will be replaced by the value of the mergeLabel option
Expand Down
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,8 @@ branches:

jobs:
include:
- env: "MODE=aot"
- env: "MODE=payload"
- env: "MODE=prerender"
- env: "MODE=e2e"
- env: "MODE=saucelabs_required"
- env: "MODE=browserstack_required"
- env: "MODE=travis_required"
- env: "DEPLOY_MODE=build-artifacts"
if: type = push
- env: "DEPLOY_MODE=docs-content"
Expand Down

0 comments on commit d1dae40

Please sign in to comment.