Skip to content

Commit d1dae40

Browse files
authored
Merge pull request #2 from angular/master
Merging changes from material
2 parents 76a6397 + a9e550e commit d1dae40

File tree

355 files changed

+11414
-11543
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

355 files changed

+11414
-11543
lines changed

.bazelignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

tools/bazel.rc renamed to .bazelrc

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,29 @@
11
###############################
2-
# Directory structure #
2+
# Filesystem interactions #
33
###############################
44

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

13-
# Another good choice is to create a dist/ directory. Then you can use
14-
# build --symlink_prefix=dist/
15-
# to get folders like dist/bin
16-
# But be aware, this will still create a bazel-out symlink in your project directory.
17-
# You may still need to exclude that, eg. from the editor's search path.
12+
# Performance: avoid stat'ing input files
13+
build --watchfs
14+
15+
# Turn off legacy external runfiles
16+
run --nolegacy_external_runfiles
17+
test --nolegacy_external_runfiles
1818

1919
###############################
20-
# Output #
20+
# Output control #
2121
###############################
2222

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

27-
# Don't print every dependency in :node_modules, for example
28-
query --noimplicit_deps
29-
3027
# By default, failing tests don't print any output, it goes to the log file
3128
test --test_output=errors
3229

@@ -43,9 +40,15 @@ build --workspace_status_command=./tools/bazel-stamp-vars.sh
4340
###############################
4441
# Typescript / Angular / Sass #
4542
###############################
46-
# Make TypeScript and Angular compilation fast, by keeping a few copies of the compiler
43+
44+
# Make compilation fast, by keeping a few copies of the compilers
4745
# running as daemons, and cache SourceFile AST's to reduce parse time.
48-
build --strategy=TypeScriptCompile=worker --strategy=AngularTemplateCompile=worker
46+
build --strategy=TypeScriptCompile=worker
47+
build --strategy=AngularTemplateCompile=worker
48+
49+
################################
50+
# Temporary Settings for Ivy #
51+
################################
4952

5053
# Use the legacy AOT compiler strategy. We don't want to compile with Ivy nor with "ngtsc" which
5154
# does not generate factory files which are needed for AOT.

.circleci/config.yml

Lines changed: 135 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# Configuration file for https://circleci.com/gh/angular/material2
22

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

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

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

55+
# Sets up a different Docker image that includes a moe recent Firefox version which
56+
# is needed for headless testing.
57+
var_9: &docker-firefox-image
58+
# TODO(devversion): Temporarily use a image that includes Firefox 62 because the
59+
# ngcontainer image does include an old Firefox version that does not support headless.
60+
# See the PR that fixes this: https://github.com/angular/angular/pull/26435
61+
- image: circleci/node:10.12-browsers
62+
63+
# Attaches the release output which has been stored in the workspace to the current job.
64+
# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
65+
var_10: &attach_release_output
66+
attach_workspace:
67+
at: dist/releases
68+
5669
# -----------------------------
5770
# Container version of CircleCI
5871
# -----------------------------
@@ -76,10 +89,84 @@ jobs:
7689
- *copy_bazel_config
7790

7891
# TODO(jelbourn): Update this command to run all tests if the Bazel issues have been fixed.
79-
- run: bazel build src/cdk/...
80-
- run: bazel test src/cdk/...
92+
- run: bazel build src/...
93+
- run: bazel test src/...
94+
95+
# ------------------------------------------------------------------------------------------
96+
# Job that runs the unit tests on locally installed browsers (Chrome and Firefox headless).
97+
# The available browsers are installed through the angular/ngcontainer Docker image.
98+
# ------------------------------------------------------------------------------------------
99+
tests_local_browsers:
100+
docker: *docker-firefox-image
101+
resource_class: xlarge
102+
environment:
103+
TEST_PLATFORM: local
104+
steps:
105+
- *checkout_code
106+
- *restore_cache
107+
- *yarn_install
81108

82-
- *save_cache
109+
# Launches the unit tests. The platform is determined by the "TEST_PLATFORM" environment
110+
# variable which has been configured above
111+
- run: yarn gulp ci:test
112+
113+
# ----------------------------------------------------------------
114+
# Job that runs the e2e tests with Protractor and Chrome Headless
115+
# ----------------------------------------------------------------
116+
e2e_tests:
117+
<<: *job_defaults
118+
resource_class: xlarge
119+
steps:
120+
- *checkout_code
121+
- *restore_cache
122+
- *yarn_install
123+
124+
- run: yarn gulp ci:e2e
125+
126+
# ----------------------------------------------------------------------------
127+
# Job that runs the unit tests on Browserstack. The browsers that will be used
128+
# to run the unit tests on Browserstack are set in: test/browser-providers.js
129+
# ----------------------------------------------------------------------------
130+
tests_browserstack:
131+
<<: *job_defaults
132+
resource_class: xlarge
133+
environment:
134+
BROWSER_STACK_USERNAME: "angularteam1"
135+
BROWSER_STACK_ACCESS_KEY: "CaXMeMHD9pr5PHg8N7Jq"
136+
parallelism: 2
137+
steps:
138+
- *checkout_code
139+
- *restore_cache
140+
- *yarn_install
141+
142+
- run: ./scripts/circleci/run-browserstack-tests.sh
143+
144+
# -----------------------------------------------------------------------------------------
145+
# Job that builds the demo-app with AOT. In order to speed up this job, the release output
146+
# from the workspace storage will be attached to this job.
147+
# -----------------------------------------------------------------------------------------
148+
build_demoapp_aot:
149+
<<: *job_defaults
150+
steps:
151+
- *checkout_code
152+
- *restore_cache
153+
- *yarn_install
154+
- *attach_release_output
155+
156+
- run: yarn gulp ci:aot
157+
158+
# -------------------------------------------------------------------------
159+
# Job that pre-render's the universal app with `@angular/platform-server`.
160+
# This verifies that Angular Material can be rendered within Node.
161+
# -------------------------------------------------------------------------
162+
prerender_build:
163+
<<: *job_defaults
164+
steps:
165+
- *checkout_code
166+
- *restore_cache
167+
- *yarn_install
168+
169+
- run: yarn gulp ci:prerender
83170

84171
# ----------------------------------
85172
# Lint job. Runs the gulp lint task.
@@ -91,13 +178,37 @@ jobs:
91178
- *restore_cache
92179
- *yarn_install
93180

94-
- run: yarn ci:lint
181+
- run: yarn gulp ci:lint
182+
183+
# -------------------------------------------------------------------------------------------
184+
# Job that builds all release packages with Gulp. The built packages can be then used in the
185+
# same workflow to publish snapshot builds or test the demo-app with the release packages.
186+
# -------------------------------------------------------------------------------------------
187+
build_release_packages:
188+
<<: *job_defaults
189+
resource_class: xlarge
190+
steps:
191+
- *checkout_code
192+
- *restore_cache
193+
- *yarn_install
194+
195+
- run: yarn gulp ci:build-release-packages
196+
197+
# Store the release output in the workspace storage. This means that other jobs
198+
# in the same workflow can attach the release output to their job.
199+
- persist_to_workspace:
200+
root: dist/releases
201+
paths:
202+
- "**/*"
95203

96204
- *save_cache
97205

98206
# ----------------------------------------------------------------------------------------
99207
# Workflow definitions. A workflow usually groups multiple jobs together. This is useful if
100208
# one job depends on another.
209+
#
210+
# NOTE: When updating this configuration section, make sure to update GitHub robot
211+
# config to match the new workflow jobs.
101212
# ----------------------------------------------------------------------------------------
102213
workflows:
103214
version: 2
@@ -108,6 +219,23 @@ workflows:
108219
jobs:
109220
- bazel_build_test
110221

222+
unit_tests:
223+
jobs:
224+
- tests_local_browsers
225+
- tests_browserstack
226+
227+
integration_tests:
228+
jobs:
229+
- e2e_tests
230+
- prerender_build
231+
232+
release_output:
233+
jobs:
234+
- build_release_packages
235+
- build_demoapp_aot:
236+
requires:
237+
- build_release_packages
238+
111239
# Lint workflow. As we want to lint in one job, this is a workflow with just one job.
112240
lint:
113241
jobs:

.github/CODEOWNERS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@
156156
/e2e/components/checkbox-e2e.spec.ts @jelbourn @devversion
157157
/e2e/components/dialog-e2e.spec.ts @jelbourn @crisbeto
158158
/e2e/components/expansion-e2e.spec.ts @josephperrott @jelbourn
159-
/e2e/components/fullscreen-e2e.spec.ts @jelbourn
160159
/e2e/components/grid-list-e2e.spec.ts @jelbourn
161160
/e2e/components/icon-e2e.spec.ts @jelbourn
162161
/e2e/components/input-e2e.spec.ts @mmalerba
@@ -178,7 +177,6 @@
178177
/src/e2e-app/checkbox/** @jelbourn @devversion
179178
/src/e2e-app/dialog/** @jelbourn @crisbeto
180179
/src/e2e-app/e2e-app/** @jelbourn
181-
/src/e2e-app/fullscreen/** @jelbourn
182180
/src/e2e-app/grid-list/** @jelbourn
183181
/src/e2e-app/icon/** @jelbourn
184182
/src/e2e-app/input/** @mmalerba

.github/angular-robot.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ merge:
5252
requiredStatuses:
5353
# TODO(josephperrott): reenable once CI flakiness is addressed
5454
# - "continuous-integration/travis-ci/pr"
55-
- "ci/circleci: build"
55+
- "ci/circleci: lint"
56+
- "ci/circleci: bazel_build_test"
57+
- "ci/circleci: tests_local_browsers"
5658

5759
# the comment that will be added when the merge label is added despite failing checks, leave empty or set to false to disable
5860
# {{MERGE_LABEL}} will be replaced by the value of the mergeLabel option

.travis.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,8 @@ branches:
2525

2626
jobs:
2727
include:
28-
- env: "MODE=aot"
2928
- env: "MODE=payload"
30-
- env: "MODE=prerender"
31-
- env: "MODE=e2e"
3229
- env: "MODE=saucelabs_required"
33-
- env: "MODE=browserstack_required"
34-
- env: "MODE=travis_required"
3530
- env: "DEPLOY_MODE=build-artifacts"
3631
if: type = push
3732
- env: "DEPLOY_MODE=docs-content"

0 commit comments

Comments
 (0)