Skip to content

Commit

Permalink
refactor: move material.aio GHA to the root (#30288)
Browse files Browse the repository at this point in the history
* refactor: move material.aio GHA to the root

This makes them functional again. To keep this change simple, we just update the working directory but run the same things

* refactor: upload testlogs when test step fails

* refactor: pin chromium test to same Ubuntu as before

See last passing job in old repo: https://github.com/angular/material.angular.io/actions/runs/12390917032/job/34586949768

* refactor: only trigger material.aio workflows when files touched in that folder

(cherry picked from commit f9a9db6)
  • Loading branch information
alexeagle authored and devversion committed Jan 14, 2025
1 parent ab44d45 commit 9490f1a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: CI
name: 'CI (material.angular.io)'

on:
push:
branches:
- main
- '[0-9]+.[0-9]+.x'
paths:
- 'material.angular.io/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -15,6 +17,7 @@ permissions: {}
defaults:
run:
shell: bash
working-directory: material.angular.io

env:
# TODO: Remove when pnpm is exclusively used.
Expand Down Expand Up @@ -54,13 +57,14 @@ jobs:
run: yarn 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: bazel-testlogs/
path: material.angular.io/bazel-testlogs/
retention-days: 14

lighthouse:
runs-on: ubuntu-latest
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@359350bbc10aab1bac85d0eec61a53377078ab82
Expand All @@ -70,7 +74,8 @@ jobs:
run: yarn 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: bazel-testlogs/
path: material.angular.io/bazel-testlogs/
retention-days: 14
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Pull Request
name: 'CI (material.angular.io)'

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

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -13,6 +15,7 @@ permissions: {}
defaults:
run:
shell: bash
working-directory: material.angular.io

env:
# TODO: Remove when pnpm is exclusively used.
Expand Down Expand Up @@ -52,13 +55,14 @@ jobs:
run: yarn 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: bazel-testlogs/
path: material.angular.io/bazel-testlogs/
retention-days: 14

lighthouse:
runs-on: ubuntu-latest
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@359350bbc10aab1bac85d0eec61a53377078ab82
Expand All @@ -68,7 +72,8 @@ jobs:
run: yarn 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: bazel-testlogs/
path: material.angular.io/bazel-testlogs/
retention-days: 14
17 changes: 0 additions & 17 deletions material.angular.io/.github/ISSUE_TEMPLATE/docs-infra.md

This file was deleted.

0 comments on commit 9490f1a

Please sign in to comment.