Skip to content

chore: migrate to Aspect CLI AXL tasks on ephemeral GHA runners #3

chore: migrate to Aspect CLI AXL tasks on ephemeral GHA runners

chore: migrate to Aspect CLI AXL tasks on ephemeral GHA runners #3

name: CI - Aspect Workflows
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
id-token: write
env:
ASPECT_API_TOKEN: ${{ secrets.ASPECT_API_TOKEN }}
# Pin the version of aspect-launcher to install to avoid GitHub API rate limiting from `latest` lookups in CI.
INSTALL_ASPECT_LAUNCHER_VERSION: 2026.21.20
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
buildifier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}-buildifier-root
repository-cache: true
external-cache: true
- name: Buildifier
run: |
curl -fsSL https://install.aspect.build | bash -s -- "$INSTALL_ASPECT_LAUNCHER_VERSION"
aspect format --task-key=buildifier-gha-ephemeral --formatter-target=//tools/format:format-starlark
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}-test-root
repository-cache: true
external-cache: true
- name: Test
run: |
curl -fsSL https://install.aspect.build | bash -s -- "$INSTALL_ASPECT_LAUNCHER_VERSION"
aspect test --task-key=test-gha-ephemeral -- //...
test-e2e-smoke:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}-test-e2e-smoke
repository-cache: true
external-cache: true
- name: Test (e2e/smoke)
working-directory: e2e/smoke
run: |
curl -fsSL https://install.aspect.build | bash -s -- "$INSTALL_ASPECT_LAUNCHER_VERSION"
aspect test --task-key=test-gha-ephemeral -- //...
test-e2e-bundle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}-test-e2e-bundle
repository-cache: true
external-cache: true
- name: Test (e2e/bundle)
working-directory: e2e/bundle
run: |
curl -fsSL https://install.aspect.build | bash -s -- "$INSTALL_ASPECT_LAUNCHER_VERSION"
aspect test --task-key=test-gha-ephemeral -- //...
test-e2e-custom-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}-test-e2e-custom-version
repository-cache: true
external-cache: true
- name: Test (e2e/custom_version)
working-directory: e2e/custom_version
run: |
curl -fsSL https://install.aspect.build | bash -s -- "$INSTALL_ASPECT_LAUNCHER_VERSION"
aspect test --task-key=test-gha-ephemeral -- //...
test-e2e-npm-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}-test-e2e-npm-links
repository-cache: true
external-cache: true
- name: Test (e2e/npm-links)
working-directory: e2e/npm-links
run: |
curl -fsSL https://install.aspect.build | bash -s -- "$INSTALL_ASPECT_LAUNCHER_VERSION"
aspect test --task-key=test-gha-ephemeral -- //...
test-e2e-sourcemaps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}-test-e2e-sourcemaps
repository-cache: true
external-cache: true
- name: Test (e2e/sourcemaps)
working-directory: e2e/sourcemaps
run: |
curl -fsSL https://install.aspect.build | bash -s -- "$INSTALL_ASPECT_LAUNCHER_VERSION"
aspect test --task-key=test-gha-ephemeral -- //...
test-e2e-toolchain-from-source:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}-test-e2e-toolchain-from-source
repository-cache: true
external-cache: true
- name: Test (e2e/toolchain_from_source)
working-directory: e2e/toolchain_from_source
run: |
curl -fsSL https://install.aspect.build | bash -s -- "$INSTALL_ASPECT_LAUNCHER_VERSION"
aspect test --task-key=test-gha-ephemeral -- //...
test-e2e-tsconfig:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}-test-e2e-tsconfig
repository-cache: true
external-cache: true
- name: Test (e2e/tsconfig)
working-directory: e2e/tsconfig
run: |
curl -fsSL https://install.aspect.build | bash -s -- "$INSTALL_ASPECT_LAUNCHER_VERSION"
aspect test --task-key=test-gha-ephemeral -- //...