Skip to content

build: update bazel setup #2325

build: update bazel setup

build: update bazel setup #2325

Workflow file for this run

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
jobs:
lint:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
# Because the checkout and setup node action is contained in the dev-infra repo, we must
# checkout the repo to be able to run the action we have created. Other repos will skip
# this step.
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: ./github-actions/npm/checkout-and-setup-node
- uses: ./github-actions/bazel/setup
- uses: ./github-actions/bazel/configure-remote
- run: yarn install --immutable
- name: Check code format
run: yarn ng-dev format changed --check ${{ github.event.pull_request.base.sha }}
- name: Check commit message
run: yarn ng-dev commit-message validate-range ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}
- name: Check code lint
run: yarn lint
- name: Confirm code builds with typescript as expected
run: yarn tsc -p tsconfig.json
- name: Check Package Licenses
# We use this action pinned at main because we need to have an actual version for the config to load.
# Since using the local version would end up nearly using `main` anyway, this is essentially equivalent.
uses: angular/dev-infra/github-actions/linting/licenses@main
with:
allow-dependencies-licenses: 'pkg:npm/renovate, pkg:npm/@renovatebot/detect-tools'
test:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
# Because the checkout and setup node action is contained in the dev-infra repo, we must
# checkout the repo to be able to run the action we have created. Other repos will skip
# this step.
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: ./github-actions/npm/checkout-and-setup-node
- uses: ./github-actions/bazel/setup
- uses: ./github-actions/bazel/configure-remote
- run: yarn install --immutable
- run: yarn bazel test -- //...
test-win:
timeout-minutes: 30
runs-on: windows-latest
steps:
# Because the checkout and setup node action is contained in the dev-infra repo, we must
# checkout the repo to be able to run the action we have created. Other repos will skip
# this step.
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: ./github-actions/npm/checkout-and-setup-node
- uses: ./github-actions/bazel/setup
- uses: ./github-actions/bazel/configure-remote
- run: yarn install --immutable
- run: yarn bazel test --test_tag_filters=windows --build_tests_only -- ... -bazel/remote-execution/...
test-macos:
timeout-minutes: 30
# Use macos-13 runner to use intel chip.
runs-on: macos-13
steps:
# Because the checkout and setup node action is contained in the dev-infra repo, we must
# checkout the repo to be able to run the action we have created. Other repos will skip
# this step.
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: ./github-actions/npm/checkout-and-setup-node
- uses: ./github-actions/bazel/setup
- run: yarn install --immutable
- run: yarn bazel test --test_tag_filters=macos --build_tests_only -- //... -//bazel/remote-execution/...