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
34 changes: 21 additions & 13 deletions .github/workflows/ci.material-aio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
branches:
- main
- '[0-9]+.[0-9]+.x'
paths:
- 'material.angular.io/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -18,42 +16,48 @@ 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@e4bf37af223483ce00f9316d227fd62cd744dc4b
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Execute Linting
run: pnpm --cwd=docs bazel test --test_tag_filters=lint //...
run: pnpm bazel test --test_tag_filters=lint //docs/...

build:
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@e4bf37af223483ce00f9316d227fd62cd744dc4b
- 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
run: pnpm -s --cwd=docs bazel build //...
- name: Execute Build
run: pnpm -s build //docs/...

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@e4bf37af223483ce00f9316d227fd62cd744dc4b
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Execute Tests
run: pnpm --cwd=docs bazel test --test_tag_filters=-lint,-e2e,-audit //...
run: pnpm bazel test --test_tag_filters=-lint,-e2e,-audit //docs/...
- name: Store Test Logs
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
if: always()
Expand All @@ -67,10 +71,14 @@ 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@e4bf37af223483ce00f9316d227fd62cd744dc4b
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Execute Lighthouse Audit
run: pnpm -s --cwd=docs bazel test --test_tag_filters=audit //...
run: pnpm -s bazel test --test_tag_filters=audit //docs/...
- name: Store Audit Logs
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
if: always()
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
24 changes: 17 additions & 7 deletions .github/workflows/pr.material-aio.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: 'CI (material.angular.io)'
name: 'PR (material.angular.io)'

on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- 'material.angular.io/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -16,16 +14,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@e4bf37af223483ce00f9316d227fd62cd744dc4b
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Execute Linting
Expand All @@ -36,6 +34,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@e4bf37af223483ce00f9316d227fd62cd744dc4b
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Execute Build
Expand All @@ -46,6 +48,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@e4bf37af223483ce00f9316d227fd62cd744dc4b
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Execute Tests
Expand All @@ -63,6 +69,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@e4bf37af223483ce00f9316d227fd62cd744dc4b
- 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
8 changes: 0 additions & 8 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@ workspace(
name = "angular_material",
)

# Point to the nested WORKSPACE we merged from github.com/angular/material.angular.io
# NB: even though this isn't referenced anywhere, it's required for Bazel to know about the
# nested workspace so that wildcard patterns like //... don't descend into it.
local_repository(
name = "material_angular_io",
path = "./material.angular.io",
)

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# Add NodeJS rules
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