build: fix dependency issues #54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'CI (material.angular.io)' | |
on: | |
push: | |
branches: | |
- main | |
- '[0-9]+.[0-9]+.x' | |
paths: | |
- 'material.angular.io/**' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: {} | |
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: Install node modules | |
run: pnpm install --frozen-lockfile | |
- name: Execute Linting | |
run: pnpm --cwd=docs bazel test --test_tag_filters=lint //... | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Initialize environment | |
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@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 //... | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Initialize environment | |
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@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 //... | |
- name: Store Test Logs | |
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 | |
if: always() | |
with: | |
name: test-logs | |
path: material.angular.io/bazel-testlogs/ | |
retention-days: 14 | |
lighthouse: | |
runs-on: ubuntu-22.04 # Note, fails on Ubuntu 24.04. see https://github.com/actions/runner-images/issues/10636 | |
steps: | |
- name: Initialize environment | |
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@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 //... | |
- name: Store Audit Logs | |
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 | |
if: always() | |
with: | |
name: lighthouse-logs | |
path: material.angular.io/bazel-testlogs/ | |
retention-days: 14 |