Skip to content
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
24 changes: 17 additions & 7 deletions .github/workflows/ci.material-aio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ defaults:
run:
shell: bash

env:
# TODO: Remove when pnpm is exclusively used.
ASPECT_RULES_JS_FROZEN_PNPM_LOCK: '1'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@e4bf37af223483ce00f9316d227fd62cd744dc4b
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@e4bf37af223483ce00f9316d227fd62cd744dc4b
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@e4bf37af223483ce00f9316d227fd62cd744dc4
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Execute Linting
Expand All @@ -38,18 +38,24 @@ jobs:
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@e4bf37af223483ce00f9316d227fd62cd744dc4b
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@e4bf37af223483ce00f9316d227fd62cd744dc4b
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@e4bf37af223483ce00f9316d227fd62cd744dc4
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Execute Direct Production Build (deploy usage)
run: pnpm -s --cwd=docs prod-build
- name: Execute Build via Bazel
- name: Execute Build
run: pnpm -s --cwd=docs bazel build //...

test:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@e4bf37af223483ce00f9316d227fd62cd744dc4b
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@e4bf37af223483ce00f9316d227fd62cd744dc4b
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@e4bf37af223483ce00f9316d227fd62cd744dc4
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Execute Tests
Expand All @@ -67,6 +73,10 @@ jobs:
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@e4bf37af223483ce00f9316d227fd62cd744dc4b
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@e4bf37af223483ce00f9316d227fd62cd744dc4b
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@e4bf37af223483ce00f9316d227fd62cd744dc4
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Execute Lighthouse Audit
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ jobs:
run: pnpm install --frozen-lockfile
- name: Run tests
run: bazel test --build_tag_filters=-e2e --test_tag_filters=-e2e --build_tests_only -- src/...
env:
ASPECT_RULES_JS_FROZEN_PNPM_LOCK: '1'
- uses: ./.github/actions/slack
if: failure()
with:
Expand Down
22 changes: 17 additions & 5 deletions .github/workflows/pr.material-aio.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'CI (material.angular.io)'
name: 'PR (material.angular.io)'

on:
pull_request:
Expand All @@ -16,16 +16,16 @@ defaults:
run:
shell: bash

env:
# TODO: Remove when pnpm is exclusively used.
ASPECT_RULES_JS_FROZEN_PNPM_LOCK: '1'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@e4bf37af223483ce00f9316d227fd62cd744dc4b
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@e4bf37af223483ce00f9316d227fd62cd744dc4b
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@e4bf37af223483ce00f9316d227fd62cd744dc4
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Execute Linting
Expand All @@ -36,6 +36,10 @@ jobs:
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@e4bf37af223483ce00f9316d227fd62cd744dc4b
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@e4bf37af223483ce00f9316d227fd62cd744dc4b
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@e4bf37af223483ce00f9316d227fd62cd744dc4
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Execute Build
Expand All @@ -46,6 +50,10 @@ jobs:
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@e4bf37af223483ce00f9316d227fd62cd744dc4b
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@e4bf37af223483ce00f9316d227fd62cd744dc4b
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@e4bf37af223483ce00f9316d227fd62cd744dc4
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Execute Tests
Expand All @@ -63,6 +71,10 @@ jobs:
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@e4bf37af223483ce00f9316d227fd62cd744dc4b
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@e4bf37af223483ce00f9316d227fd62cd744dc4b
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@e4bf37af223483ce00f9316d227fd62cd744dc4
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Execute Lighthouse Audit
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ jobs:
run: pnpm install --frozen-lockfile
- name: Run tests
run: bazel test --build_tag_filters=-e2e --test_tag_filters=-e2e --build_tests_only -- src/...
env:
ASPECT_RULES_JS_FROZEN_PNPM_LOCK: '1'

build:
runs-on: ubuntu-latest-16core
Expand Down
36 changes: 29 additions & 7 deletions docs/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
load("@aspect_rules_js//js:defs.bzl", "js_test")
load("@aspect_rules_js//js:defs.bzl", "js_binary", "js_library", "js_test")
load("@npm2//:defs.bzl", "npm_link_all_packages")
load("//docs:defs.bzl", "ng_app")

Expand Down Expand Up @@ -46,21 +46,43 @@ ng_app(
],
)

js_test(
name = "audit",
args = [
"$(location //docs:build.production)",
js_library(
name = "audit_lib",
srcs = [
"tools/audit-docs.js",
"tools/lighthouse-audit.mjs",
],
data = [
"tools/lighthouse-audit.mjs",
"//docs:build.production",
"//docs:node_modules/light-server",
"//docs:node_modules/lighthouse",
"//docs:node_modules/lighthouse-logger",
"//docs:node_modules/puppeteer-core",
"//docs:node_modules/shelljs",
"@rules_browsers//src/browsers/chromium",
],
)

js_binary(
name = "audit_tool",
data = [":audit_lib"],
entry_point = "tools/audit-docs.js",
env = {
"CHROMIUM_BIN": "$(CHROME-HEADLESS-SHELL)",
},
toolchains = [
"@rules_browsers//src/browsers/chromium:toolchain_alias",
],
)

js_test(
name = "audit",
args = [
"$(location //docs:build.production)",
],
data = [
":audit_lib",
"//docs:build.production",
],
entry_point = "tools/audit-docs.js",
env = {
"CHROMIUM_BIN": "$(CHROME-HEADLESS-SHELL)",
Expand Down
4 changes: 1 addition & 3 deletions scripts/docs-deploy/monitoring/index.mts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ import {projectDir, sites} from '../utils.mjs';
* specified remote URL is properly functioning.
*/
export async function runMonitorTests(remoteUrl: string) {
cd(path.join(projectDir, 'docs'));

await $`node ./tools/audit-docs.js ${remoteUrl}`;
await $`pnpm bazel run //docs:audit_tool -- ${remoteUrl}`;
}

/** Runs the monitoring tests for the stable release train. */
Expand Down
Loading