Skip to content

Commit

Permalink
build: move devkit repo back to angular-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
hansl committed Jun 6, 2018
1 parent 3ba18a9 commit 44086c6
Show file tree
Hide file tree
Showing 1,431 changed files with 87,108 additions and 18,524 deletions.
8 changes: 5 additions & 3 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ matrix:
install:
- ps: Install-Product node $env:nodejs_version
- npm install
# Appveyor (via chocolatey) cannot use older versions of Chrome:
# https://github.com/chocolatey/chocolatey-coreteampackages/tree/master/automatic/googlechrome
- npm run webdriver-update-appveyor

test_script:
- node --version
- npm --version
- npm run test:cli
- node tests\run_e2e.js --appveyor "--glob=tests/{basic,commands,generate,build/styles}/**"
- npm test
- npm run test-large

build: off
deploy: off
shallow_clone: true

cache:
- node_modules -> package-lock.json
20 changes: 20 additions & 0 deletions .circleci/bazel.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# These options are enabled when running on CI
# We do this by copying this file to /etc/bazel.bazelrc at the start of the build.

# Echo all the configuration settings and their source
build --announce_rc

# Don't be spammy in the logs
build --noshow_progress

# Don't run manual tests
test --test_tag_filters=-manual

# Workaround https://github.com/bazelbuild/bazel/issues/3645
# Bazel doesn't calculate the memory ceiling correctly when running under Docker.
# Limit Bazel to consuming resources that fit in CircleCI "medium" class which is the default:
# https://circleci.com/docs/2.0/configuration-reference/#resource_class
build --local_resources=3072,2.0,1.0

# Retry in the event of flakes
test --flaky_test_attempts=2
183 changes: 183 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
version: 2

_defaults: &defaults
working_directory: ~/ng
docker:
- image: angular/ngcontainer:0.3.0

_post_checkout: &post_checkout
post: git pull --ff-only origin "refs/pull/${CI_PULL_REQUEST//*pull\//}/merge"

_root_package_lock_key: &_root_package_lock_key
key: angular_devkit-{{ checksum "package-lock.json" }}-0.3.0

jobs:
install:
<<: *defaults
steps:
- checkout: *post_checkout
- restore_cache: *_root_package_lock_key
- run: npm install --no-save
- save_cache:
<<: *_root_package_lock_key
paths:
- "node_modules"

lint:
<<: *defaults
steps:
- checkout: *post_checkout
- restore_cache: *_root_package_lock_key
- run: npm run lint

validate:
<<: *defaults
steps:
- checkout: *post_checkout
- restore_cache: *_root_package_lock_key
- run: npm run validate -- --ci

test:
<<: *defaults
steps:
- checkout: *post_checkout
- restore_cache: *_root_package_lock_key
- run: npm run test -- --code-coverage --full

test-large:
<<: *defaults
resource_class: large
steps:
- checkout: *post_checkout
- restore_cache: *_root_package_lock_key
- run: npm run webdriver-update-circleci
- run: npm run test-large -- --code-coverage --full

e2e-cli:
<<: *defaults
environment:
BASH_ENV: ~/.profile
resource_class: xlarge
parallelism: 4
steps:
- checkout: *post_checkout
- restore_cache: *_root_package_lock_key
- run: xvfb-run -a npm run test-cli-e2e -- --nb-shards=${CIRCLE_NODE_TOTAL} --shard=${CIRCLE_NODE_INDEX}

integration:
<<: *defaults
steps:
- checkout:
<<: *post_checkout
- restore_cache:
key: angular_devkit-{{ checksum "package-lock.json" }}
- restore_cache:
key: angular_devkit-integration-simple-{{ checksum "tests/@angular_devkit/build_optimizer/webpack/simple-app/package-lock.json" }}
- restore_cache:
key: angular_devkit-integration-aio-{{ checksum "tests/@angular_devkit/build_optimizer/webpack/aio-app/package-lock.json" }}

- run: xvfb-run -a npm run integration

- save_cache:
key: angular_devkit-integration-simple-{{ checksum "tests/@angular_devkit/build_optimizer/webpack/simple-app/package-lock.json" }}
paths:
- "tests/@angular_devkit/build_optimizer/webpack/simple-app/node_modules"
- save_cache:
key: angular_devkit-integration-aio-{{ checksum "tests/@angular_devkit/build_optimizer/webpack/aio-app/package-lock.json" }}
paths:
- "tests/@angular_devkit/build_optimizer/webpack/aio-app/node_modules"

build:
<<: *defaults
steps:
- checkout: *post_checkout
- restore_cache: *_root_package_lock_key
- run: npm run admin -- build

build-bazel:
<<: *defaults
resource_class: large
steps:
- checkout: *post_checkout
- run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
- run: bazel run @nodejs//:npm install
- run: bazel build //packages/...

snapshot_publish:
<<: *defaults
steps:
- checkout: *post_checkout
- restore_cache: *_root_package_lock_key
- run:
name: Decrypt Credentials
command: |
openssl aes-256-cbc -d -in .circleci/github_token -k "${KEY}" -out ~/github_token
- run:
name: Deployment to Snapshot
command: |
npm run admin -- snapshots --verbose --githubTokenFile=${HOME}/github_token
publish:
<<: *defaults
steps:
- checkout: *post_checkout
- restore_cache: *_root_package_lock_key
- run:
name: Decrypt Credentials
command: |
openssl aes-256-cbc -d -in .circleci/npm_token -k "${KEY}" -out ~/.npmrc
- run:
name: Deployment to NPM
command: |
npm run admin -- publish --verbose
workflows:
version: 2
default_workflow:
jobs:
- install
- lint:
requires:
- install
- validate:
requires:
- install
- build:
requires:
- lint
- validate
- build-bazel:
requires:
- lint
- validate
- test:
requires:
- build
- test-large:
requires:
- build
- integration:
requires:
- build
- e2e-cli:
requires:
- build
- snapshot_publish:
requires:
- test
- build
- e2e-cli
filters:
branches:
only: master
- publish:
requires:
- test
- build
- integration
- snapshot_publish
filters:
tags:
only: /^v\d+/
branches:
ignore: /.*/
1 change: 1 addition & 0 deletions .circleci/github_token
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Salted__z�����"B��Y��|�ۍ�V�QֳUzW�/G��R �e}j�% ���<%������
1 change: 1 addition & 0 deletions .circleci/npm_token
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Salted__�/��L ���ö���;��(.|��� ��C��Ԓ����5`h�8��i8J�o*�?}���3�0f�!�'�B�̠�"UƊ&K!�%�ɵڤ
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

root = true

[*]
[*.ts]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
spaces_around_brackets = inside
trim_trailing_whitespace = true

[*.md]
Expand Down
7 changes: 0 additions & 7 deletions .eslintignore

This file was deleted.

Loading

0 comments on commit 44086c6

Please sign in to comment.