Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

ci: convert bazel jobs to a PR Github Action workflow #1262

Merged
merged 1 commit into from
Aug 15, 2024
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
68 changes: 0 additions & 68 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,70 +107,6 @@ jobs:
environment:
CHROMIUM_BIN: '/usr/bin/google-chrome'

bazel-build:
<<: *job_defaults
resource_class: large
steps:
- checkout
- restore_cache:
key: *cache_key
- *yarn_install
- run:
command: yarn bazel build //...
environment:
# TODO: Remove when pnpm is exclusively used.
ASPECT_RULES_JS_FROZEN_PNPM_LOCK: '1'
- *save_cache

bazel-test:
<<: *job_defaults
resource_class: large
steps:
- checkout
- restore_cache:
key: *cache_key
- *yarn_install
- run:
command: yarn bazel test --test_tag_filters=-lint,-e2e,-audit //...
environment:
# TODO: Remove when pnpm is exclusively used.
ASPECT_RULES_JS_FROZEN_PNPM_LOCK: '1'
- *save_cache
- store_artifacts:
path: bazel-testlogs/
- store_artifacts:
path: bazel-testlogs/scenes/

bazel-lint:
<<: *job_defaults
resource_class: large
steps:
- checkout
- restore_cache:
key: *cache_key
- *yarn_install
- run: yarn bazel test --test_tag_filters=+lint //...
- *save_cache
- store_artifacts:
path: bazel-testlogs/
- store_artifacts:
path: bazel-testlogs/scenes/

bazel-lighthouse_audits:
<<: *job_defaults
resource_class: xlarge
steps:
- checkout
- restore_cache:
key: *cache_key
- *yarn_install
- run: yarn bazel test --test_tag_filters=+audit //...
- *save_cache
- store_artifacts:
path: bazel-testlogs/
- store_artifacts:
path: bazel-testlogs/scenes/

workflows:
version: 2
default_workflow:
Expand All @@ -181,7 +117,3 @@ workflows:
- lighthouse_audits:
requires:
- build
- bazel-build
- bazel-test
- bazel-lighthouse_audits
- bazel-lint
72 changes: 72 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Pull Request

on:
pull_request:
types: [opened, synchronize, reopened]

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@db91da4e742cd081bfba01db2edc4e816018419b
- name: Install node modules
run: yarn install
- name: Execute Linting
run: yarn 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@db91da4e742cd081bfba01db2edc4e816018419b
- name: Install node modules
run: yarn install
- name: Execute Build
run: yarn bazel build //...

test:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@db91da4e742cd081bfba01db2edc4e816018419b
- name: Install node modules
run: yarn install
- name: Execute Tests
run: yarn bazel test --test_tag_filters=-lint,-e2e,-audit //...
- name: Store Test Logs
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: test-logs
path: bazel-testlogs/
retention-days: 14

lighthouse:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@db91da4e742cd081bfba01db2edc4e816018419b
- name: Install node modules
run: yarn install
- name: Execute Lighthouse Audit
run: yarn bazel test --test_tag_filters=audit //...
- name: Store Audit Logs
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: lighthouse-logs
path: bazel-testlogs/
retention-days: 14
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.11.0
20.16.0