ci: add labels to angular devtools ci tasks

This commit also cleans up the .bazelrc file in the devtools directory
This commit is contained in:
AleksanderBodurri
2021-11-30 23:41:58 -05:00
parent aab59c1e09
commit e5cdd3397d
3 changed files with 24 additions and 35 deletions
+18 -6
View File
@@ -739,12 +739,24 @@ jobs:
steps:
- custom_attach_workspace
- init_environment
- run: sudo apt-get update
- run: sudo apt-get -y install libgtk-3-0 libasound2 libnss3 libxss1 libdrm2 libgbm-dev libxshmfence-dev libgtk2.0-0 libnotify-dev libgconf-2-4 libxtst6 xauth xvfb
- run: yarn --cwd devtools install --frozen-lockfile --non-interactive --cache-folder ~/.cache/yarn
- run: yarn --cwd devtools test:ci
- run: yarn --cwd devtools build:chrome
- run: yarn --cwd devtools cy:ci
- run:
name: Sync package index files
command: sudo apt-get update
- run:
name: Install Karma and Cypress dependencies
command: sudo apt-get -y install libgtk-3-0 libasound2 libnss3 libxss1 libdrm2 libgbm-dev libxshmfence-dev libgtk2.0-0 libnotify-dev libgconf-2-4 libxtst6 xauth xvfb
- run:
name: Install DevTools dependencies
command: yarn --cwd devtools install --frozen-lockfile --non-interactive --cache-folder ~/.cache/yarn
- run:
name: Run unit tests
command: yarn --cwd devtools test:ci
- run:
name: Test production build
command: yarn --cwd devtools build:chrome:ci
- run:
name: Run e2e tests
command: yarn --cwd devtools cy:ci
workflows:
version: 2
-24
View File
@@ -1,27 +1,3 @@
# 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.
# See documentation in /docs/BAZEL.md
# Import config items common to both Linux and Windows setups.
# https://docs.bazel.build/versions/master/guide.html#bazelrc-syntax-and-semantics
try-import %workspace%/.circleci/bazel.common.rc
# Save downloaded repositories in a location that can be cached by CircleCI. This helps us
# speeding up the analysis time significantly with Bazel managed node dependencies on the CI.
build --repository_cache=/home/circleci/bazel_repository_cache
# 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 "xlarge" class
# https://circleci.com/docs/2.0/configuration-reference/#resource_class
build --local_cpu_resources=20
build --local_ram_resources=32768
# All build executed remotely should be done using our RBE configuration.
build:remote --google_default_credentials
build --config=remote
import ../.bazelrc
build --flag_alias=partial_compilation=@npm//@angular/bazel/src:partial_compilation
+6 -5
View File
@@ -6,11 +6,11 @@
"ng": "ng",
"cypress:verify": "cypress verify",
"start": "ibazel run src:devserver",
"start-no-animations": "bazel run src:devserver-e2e",
"build:chrome": "bazel build projects/shell-chrome/src:prodapp",
"start-no-animations": "bazelisk run src:devserver-e2e",
"build:chrome": "bazelisk build projects/shell-chrome/src:prodapp",
"build:chrome:watch": "ibazel build projects/shell-chrome/src:prodapp",
"release": "node projects/shell-chrome/set-version.js && build:chrome",
"test": "bazelisk test ...",
"test": "bazelisk test //...",
"lint": "tslint -p tsconfig.json -c tslint.json",
"lint:fix": "tslint -p tsconfig.json -c tslint.json --fix",
"e2e": "yarn cy:run",
@@ -18,9 +18,10 @@
"cy:version": "$(yarn bin)/cypress version",
"cy:run": "yarn cypress run",
"cy:open": "yarn cypress open",
"cy:ci": "start-server-and-test start http-get://localhost:4200 cy:run",
"cy:watch": "start-server-and-test start http-get://localhost:4200 cy:open",
"test:ci": "bazelisk test //...",
"cy:ci": "start-server-and-test start http-get://localhost:4200 cy:run",
"test:ci": "bazelisk --bazelrc=../.circleci/bazel.linux.rc test //...",
"build:chrome:ci": "bazelisk build projects/shell-chrome/src:prodapp",
"prettier": "prettier --write \"{,!(node_modules|dist|build|coverage)/**/}*.{js,jsx,ts,tsx,json}\"",
"prettier:fix": "pretty-quick --staged"
},