Skip to content

build: switch to yarn #13362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# http://yaml-online-parser.appspot.com/

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

# Define common ENV vars
var_3: &define_env_vars
Expand Down
18 changes: 11 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,22 @@ jobs:
if: type = cron
env:
global:
- LOGS_DIR=/tmp/angular-material2-build/logs
- SAUCE_USERNAME=angular-ci
- BROWSER_STACK_USERNAME=angularteam1
- BROWSER_STACK_ACCESS_KEY=CaXMeMHD9pr5PHg8N7Jq
- BROWSER_PROVIDER_READY_FILE=/tmp/angular-material2-build/readyfile
- BROWSER_PROVIDER_ERROR_FILE=/tmp/angular-material2-build/errorfile
# Keep Yarn version in sync with Yarn version within Bazel WORKSPACE.
- YARN_VERSION=1.9.4
- LOGS_DIR=/tmp/angular-material2-build/logs
- SAUCE_USERNAME=angular-ci
- BROWSER_STACK_USERNAME=angularteam1
- BROWSER_STACK_ACCESS_KEY=CaXMeMHD9pr5PHg8N7Jq
- BROWSER_PROVIDER_READY_FILE=/tmp/angular-material2-build/readyfile
- BROWSER_PROVIDER_ERROR_FILE=/tmp/angular-material2-build/errorfile

before_install:
- source ./scripts/ci/travis-env.sh
- source ./scripts/ci/install-yarn.sh
- if [[ "$TRAVIS_EVENT_TYPE" == "cron" ]]; then ./scripts/install-angular-snapshot.sh --only-save; fi

install:
- npm install
- yarn install --frozen-lockfile --non-interactive

before_script:
- mkdir -p $LOGS_DIR
Expand All @@ -62,5 +65,6 @@ script:
- ./scripts/ci/travis-script.sh

cache:
yarn: true
directories:
- ./node_modules/
14 changes: 10 additions & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,21 @@ sass_repositories()

# NOTE: this rule installs nodejs, npm, and yarn, but does NOT install
# your npm dependencies. You must still run the package manager.
load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "npm_install")
node_repositories()
load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "yarn_install")

node_repositories(
# For deterministic builds, specify explicit NodeJS and Yarn versions. Keep the Yarn version
# in sync with the version of Travis.
node_version = "10.10.0",
yarn_version = "1.9.4",
)

# Use Bazel managed node modules. See more below:
# https://github.com/bazelbuild/rules_nodejs#bazel-managed-vs-self-managed-dependencies
npm_install(
yarn_install(
name = "npm",
package_json = "//:package.json",
package_lock_json = "//:package-lock.json",
yarn_lock = "//:yarn.lock",
)

# Setup TypeScript Bazel workspace
Expand Down
Loading