Skip to content

Commit c45c7cb

Browse files
authored
Merge pull request #3 from angular/master
Merging master
2 parents d1dae40 + 3f2751f commit c45c7cb

File tree

694 files changed

+14070
-11751
lines changed

Some content is hidden

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

694 files changed

+14070
-11751
lines changed

.circleci/config.yml

Lines changed: 128 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ var_9: &docker-firefox-image
6464
# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
6565
var_10: &attach_release_output
6666
attach_workspace:
67-
at: dist/releases
67+
at: dist/releases
6868

6969
# -----------------------------
7070
# Container version of CircleCI
@@ -88,27 +88,12 @@ jobs:
8888
- *restore_cache
8989
- *copy_bazel_config
9090

91-
# TODO(jelbourn): Update this command to run all tests if the Bazel issues have been fixed.
9291
- run: bazel build src/...
93-
- run: bazel test src/...
92+
- run: bazel test src/... tools/public_api_guard/...
9493

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
108-
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
94+
# Note: We want to save the cache in this job because the workspace cache also
95+
# includes the Bazel repository cache that will be updated in this job.
96+
- *save_cache
11297

11398
# ----------------------------------------------------------------
11499
# Job that runs the e2e tests with Protractor and Chrome Headless
@@ -123,6 +108,20 @@ jobs:
123108

124109
- run: yarn gulp ci:e2e
125110

111+
# ------------------------------------------------------------------------------------------
112+
# Job that runs the unit tests on locally installed browsers (Chrome and Firefox headless).
113+
# The available browsers are installed through the angular/ngcontainer Docker image.
114+
# ------------------------------------------------------------------------------------------
115+
tests_local_browsers:
116+
docker: *docker-firefox-image
117+
resource_class: xlarge
118+
steps:
119+
- *checkout_code
120+
- *restore_cache
121+
- *yarn_install
122+
123+
- run: ./scripts/circleci/run-local-browser-tests.sh
124+
126125
# ----------------------------------------------------------------------------
127126
# Job that runs the unit tests on Browserstack. The browsers that will be used
128127
# to run the unit tests on Browserstack are set in: test/browser-providers.js
@@ -133,19 +132,38 @@ jobs:
133132
environment:
134133
BROWSER_STACK_USERNAME: "angularteam1"
135134
BROWSER_STACK_ACCESS_KEY: "CaXMeMHD9pr5PHg8N7Jq"
136-
parallelism: 2
137135
steps:
138136
- *checkout_code
139137
- *restore_cache
140138
- *yarn_install
141139

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

142+
# ----------------------------------------------------------------------------
143+
# Job that runs the unit tests on Saucelabs. The browsers that will be used
144+
# to run the unit tests on Saucelabs are set in: test/browser-providers.js
145+
# ----------------------------------------------------------------------------
146+
tests_saucelabs:
147+
<<: *job_defaults
148+
resource_class: xlarge
149+
environment:
150+
SAUCE_USERNAME: "angular-ci"
151+
SAUCE_ACCESS_KEY: "9b988f434ff8-fbca-8aa4-4ae3-35442987"
152+
# Note: This number should not be too high because otherwise we might run into
153+
# a rate limit exception.
154+
KARMA_PARALLEL_BROWSERS: 2
155+
steps:
156+
- *checkout_code
157+
- *restore_cache
158+
- *yarn_install
159+
160+
- run: ./scripts/circleci/run-saucelabs-tests.sh
161+
144162
# -----------------------------------------------------------------------------------------
145-
# Job that builds the demo-app with AOT. In order to speed up this job, the release output
163+
# Job that builds the dev-app with AOT. In order to speed up this job, the release output
146164
# from the workspace storage will be attached to this job.
147165
# -----------------------------------------------------------------------------------------
148-
build_demoapp_aot:
166+
build_devapp_aot:
149167
<<: *job_defaults
150168
steps:
151169
- *checkout_code
@@ -182,7 +200,7 @@ jobs:
182200

183201
# -------------------------------------------------------------------------------------------
184202
# 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.
203+
# same workflow to publish snapshot builds or test the dev-app with the release packages.
186204
# -------------------------------------------------------------------------------------------
187205
build_release_packages:
188206
<<: *job_defaults
@@ -201,7 +219,68 @@ jobs:
201219
paths:
202220
- "**/*"
203221

204-
- *save_cache
222+
# Since there is no UMD bundle that includes everything from the CDK, we need to move
223+
# all bundles into a directory. This allows us to store all CDK UMD bundles as job
224+
# artifacts that can be picked up by the Angular Github bot.
225+
- run:
226+
name: Prepare CDK artifacts for publish.
227+
command: |
228+
mkdir -p /tmp/cdk-umd-minified-bundles
229+
cp dist/releases/cdk/bundles/*.umd.min.js /tmp/cdk-umd-minified-bundles
230+
231+
# Publish bundle artifacts which will be used to calculate the size change.
232+
# Note: Make sure that the size plugin from the Angular robot fetches the artifacts
233+
# from this CircleCI job (see .github/angular-robot.yml). Additionally any artifacts need to
234+
# be stored with the following path format: "{projectName}/{context}/{fileName}"
235+
# This format is necessary because otherwise the bot is not able to pick up the
236+
# artifacts from CircleCI. See:
237+
# https://github.com/angular/github-robot/blob/master/functions/src/plugins/size.ts#L392-L394
238+
- store_artifacts:
239+
path: dist/releases/material/bundles/material.umd.min.js
240+
destination: /angular_material/material_release_output/material.umd.min.js
241+
- store_artifacts:
242+
path: /tmp/cdk-umd-minified-bundles
243+
destination: /angular_material/cdk_release_output/
244+
245+
# ----------------------------------------
246+
# Job that publishes the build snapshots
247+
# ----------------------------------------
248+
publish_snapshots:
249+
<<: *job_defaults
250+
steps:
251+
# Since CircleCI currently does not have any way to easily restrict jobs to only run
252+
# for push builds, we need to manually skip publishing if the jobs runs for a PR.
253+
# https://discuss.circleci.com/t/workflows-pull-request-filter/14396/11
254+
- run:
255+
name: Check whether this job should be skipped.
256+
command: '[[ -n ${CIRCLE_PR_NUMBER} ]] && circleci step halt || true'
257+
258+
- *checkout_code
259+
- *restore_cache
260+
- *yarn_install
261+
- *attach_release_output
262+
263+
# CircleCI has a config setting to enforce SSH for all github connections.
264+
# This is not compatible with our mechanism of using a Personal Access Token
265+
# to publish the build snapshots. In order to fix this, we unset the global option.
266+
- run: git config --global --unset "url.ssh://[email protected]"
267+
268+
- run: ./scripts/circleci/publish-snapshots.sh
269+
270+
271+
# ----------------------------------------------------------------------------
272+
# Job that runs the local browser tests against the Angular Github snapshots
273+
# ----------------------------------------------------------------------------
274+
snapshot_tests_local_browsers:
275+
docker: *docker-firefox-image
276+
resource_class: xlarge
277+
steps:
278+
- *checkout_code
279+
- *restore_cache
280+
- *yarn_install
281+
282+
- run: ./scripts/install-angular-snapshots.sh
283+
- run: ./scripts/circleci/run-local-browser-tests.sh
205284

206285
# ----------------------------------------------------------------------------------------
207286
# Workflow definitions. A workflow usually groups multiple jobs together. This is useful if
@@ -223,6 +302,7 @@ workflows:
223302
jobs:
224303
- tests_local_browsers
225304
- tests_browserstack
305+
- tests_saucelabs
226306

227307
integration_tests:
228308
jobs:
@@ -232,7 +312,10 @@ workflows:
232312
release_output:
233313
jobs:
234314
- build_release_packages
235-
- build_demoapp_aot:
315+
- build_devapp_aot:
316+
requires:
317+
- build_release_packages
318+
- publish_snapshots:
236319
requires:
237320
- build_release_packages
238321

@@ -241,6 +324,25 @@ workflows:
241324
jobs:
242325
- lint
243326

327+
# Snapshot tests workflow that is scheduled to run all specified jobs at midnight everyday.
328+
# This workflow runs various jobs against the Angular snapshot builds from Github.
329+
snapshot_tests:
330+
jobs:
331+
# Note that we need additional jobs for the nightly snapshot tests because there is no
332+
# easy way to detect whether a job runs inside of a cronjob or specific workflow.
333+
# See: https://circleci.com/ideas/?idea=CCI-I-295
334+
- snapshot_tests_local_browsers
335+
triggers:
336+
- schedule:
337+
cron: "0 0 * * *"
338+
filters:
339+
branches:
340+
only:
341+
# We only want to run the "master" branch against the snapshot builds because
342+
# it's not guaranteed that older versions of Angular Material always work
343+
# with the latest Angular version.
344+
- master
345+
244346
# ---------------------------
245347
# General setup for CircleCI
246348
# ---------------------------

.github/CODEOWNERS

Lines changed: 54 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
/src/lib/stepper/** @mmalerba
3434
/src/lib/table/** @andrewseguin
3535
/src/lib/tabs/** @andrewseguin
36+
/src/lib/testing/** @jelbourn
3637
/src/lib/toolbar/** @devversion
3738
/src/lib/tooltip/** @andrewseguin
3839
/src/lib/tree/** @jelbourn @andrewseguin
@@ -52,7 +53,6 @@
5253
/src/lib/core/selection/** @jelbourn
5354
/src/lib/core/selection/pseudo*/** @crisbeto @jelbourn
5455
/src/lib/core/style/** @jelbourn
55-
/src/lib/core/testing/** @jelbourn
5656
/src/lib/core/theming/** @jelbourn
5757
/src/lib/core/typography/** @crisbeto
5858
/src/lib/core/util/** @jelbourn
@@ -94,58 +94,59 @@
9494
/guides/** @jelbourn
9595
/src/material-examples/** @jelbourn
9696

97-
# Demo app
98-
/src/demo-app/* @jelbourn
99-
/src/demo-app/a11y/** @jelbourn
100-
/src/demo-app/autocomplete/** @crisbeto
101-
/src/demo-app/badge/** @jelbourn
102-
/src/demo-app/baseline/** @mmalerba
103-
/src/demo-app/bottom-sheet/** @jelbourn @crisbeto
104-
/src/demo-app/button-toggle/** @jelbourn
105-
/src/demo-app/button/** @jelbourn
106-
/src/demo-app/card/** @jelbourn
107-
/src/demo-app/checkbox/** @jelbourn @devversion
108-
/src/demo-app/chips/** @jelbourn
109-
/src/demo-app/connected-overlay/** @jelbourn @crisbeto
110-
/src/demo-app/dataset/** @andrewseguin
111-
/src/demo-app/datepicker/** @mmalerba
112-
/src/demo-app/demo-app/** @jelbourn
113-
/src/demo-app/dialog/** @jelbourn @crisbeto
114-
/src/demo-app/drawer/** @mmalerba
115-
/src/demo-app/drag-drop/** @crisbeto
116-
/src/demo-app/example/** @andrewseguin
117-
/src/demo-app/examples-page/** @andrewseguin
118-
/src/demo-app/expansion/** @josephperrott
119-
/src/demo-app/focus-origin/** @mmalerba
120-
/src/demo-app/gestures/** @jelbourn
121-
/src/demo-app/grid-list/** @jelbourn
122-
/src/demo-app/icon/** @jelbourn
123-
/src/demo-app/input/** @mmalerba
124-
/src/demo-app/list/** @jelbourn @crisbeto @devversion
125-
/src/demo-app/live-announcer/** @jelbourn
126-
/src/demo-app/menu/** @crisbeto
127-
/src/demo-app/overlay/** @jelbourn @crisbeto
128-
/src/demo-app/paginator/** @andrewseguin
129-
/src/demo-app/platform/** @jelbourn @devversion
130-
/src/demo-app/portal/** @jelbourn
131-
/src/demo-app/progress-bar/** @jelbourn @crisbeto @josephperrott
132-
/src/demo-app/progress-spinner/** @jelbourn @crisbeto @josephperrott
133-
/src/demo-app/radio/** @jelbourn @devversion
134-
/src/demo-app/ripple/** @devversion
135-
/src/demo-app/screen-type/** @josephperrott
136-
/src/demo-app/select/** @crisbeto
137-
/src/demo-app/sidenav/** @mmalerba
138-
/src/demo-app/slide-toggle/** @devversion
139-
/src/demo-app/slider/** @mmalerba
140-
/src/demo-app/snack-bar/** @jelbourn @crisbeto @josephperrott
141-
/src/demo-app/stepper/** @mmalerba
142-
/src/demo-app/table/** @andrewseguin
143-
/src/demo-app/tabs/** @andrewseguin
144-
/src/demo-app/toolbar/** @devversion
145-
/src/demo-app/tooltip/** @andrewseguin
146-
/src/demo-app/tree/** @jelbourn
147-
/src/demo-app/typography/** @crisbeto
148-
/src/demo-app/virtual-scroll/** @mmalerba
97+
# Accessibility demos
98+
/src/a11y-demo/**/* @jelbourn
99+
100+
# Dev-app
101+
/src/dev-app/* @jelbourn
102+
/src/dev-app/autocomplete/** @crisbeto
103+
/src/dev-app/badge/** @jelbourn
104+
/src/dev-app/baseline/** @mmalerba
105+
/src/dev-app/bottom-sheet/** @jelbourn @crisbeto
106+
/src/dev-app/button-toggle/** @jelbourn
107+
/src/dev-app/button/** @jelbourn
108+
/src/dev-app/card/** @jelbourn
109+
/src/dev-app/checkbox/** @jelbourn @devversion
110+
/src/dev-app/chips/** @jelbourn
111+
/src/dev-app/connected-overlay/** @jelbourn @crisbeto
112+
/src/dev-app/dataset/** @andrewseguin
113+
/src/dev-app/datepicker/** @mmalerba
114+
/src/dev-app/dialog/** @jelbourn @crisbeto
115+
/src/dev-app/drawer/** @mmalerba
116+
/src/dev-app/drag-drop/** @crisbeto
117+
/src/dev-app/example/** @andrewseguin
118+
/src/dev-app/examples-page/** @andrewseguin
119+
/src/dev-app/expansion/** @josephperrott
120+
/src/dev-app/focus-origin/** @mmalerba
121+
/src/dev-app/gestures/** @jelbourn
122+
/src/dev-app/grid-list/** @jelbourn
123+
/src/dev-app/icon/** @jelbourn
124+
/src/dev-app/input/** @mmalerba
125+
/src/dev-app/list/** @jelbourn @crisbeto @devversion
126+
/src/dev-app/menu/** @crisbeto
127+
/src/dev-app/live-announcer/** @jelbourn
128+
/src/dev-app/overlay/** @jelbourn @crisbeto
129+
/src/dev-app/paginator/** @andrewseguin
130+
/src/dev-app/platform/** @jelbourn @devversion
131+
/src/dev-app/portal/** @jelbourn
132+
/src/dev-app/progress-bar/** @jelbourn @crisbeto @josephperrott
133+
/src/dev-app/progress-spinner/** @jelbourn @crisbeto @josephperrott
134+
/src/dev-app/radio/** @jelbourn @devversion
135+
/src/dev-app/ripple/** @devversion
136+
/src/dev-app/screen-type/** @josephperrott
137+
/src/dev-app/select/** @crisbeto
138+
/src/dev-app/sidenav/** @mmalerba
139+
/src/dev-app/slide-toggle/** @devversion
140+
/src/dev-app/slider/** @mmalerba
141+
/src/dev-app/snack-bar/** @jelbourn @crisbeto @josephperrott
142+
/src/dev-app/stepper/** @mmalerba
143+
/src/dev-app/table/** @andrewseguin
144+
/src/dev-app/tabs/** @andrewseguin
145+
/src/dev-app/toolbar/** @devversion
146+
/src/dev-app/tooltip/** @andrewseguin
147+
/src/dev-app/tree/** @jelbourn
148+
/src/dev-app/typography/** @crisbeto
149+
/src/dev-app/virtual-scroll/** @mmalerba
149150

150151
# E2E app
151152
/e2e/* @jelbourn

.github/angular-robot.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22

33
#options for the size plugin
44
size:
5-
disabled: true
5+
disabled: false
6+
# Name of the status that will be responsible for providing
7+
# artifacts that will be measured by the robot.
8+
circleCiStatusName: "ci/circleci: build_release_packages"
9+
# Byte value of maximum allowed change in size
10+
maxSizeIncrease: 10000
611

712
# options for the merge plugin
813
merge:
@@ -50,11 +55,12 @@ merge:
5055

5156
# list of PR statuses that need to be successful
5257
requiredStatuses:
53-
# TODO(josephperrott): reenable once CI flakiness is addressed
54-
# - "continuous-integration/travis-ci/pr"
5558
- "ci/circleci: lint"
5659
- "ci/circleci: bazel_build_test"
5760
- "ci/circleci: tests_local_browsers"
61+
- "ci/circleci: tests_browserstack"
62+
- "ci/circleci: tests_saucelabs"
63+
- "ci/circleci: build_release_packages"
5864

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

0 commit comments

Comments
 (0)