|
| 1 | +name: CI - Aspect Workflows |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [main] |
| 6 | + pull_request: |
| 7 | + branches: [main] |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +permissions: |
| 11 | + id-token: write |
| 12 | + |
| 13 | +env: |
| 14 | + ASPECT_API_TOKEN: ${{ secrets.ASPECT_API_TOKEN }} |
| 15 | + INSTALL_ASPECT_LAUNCHER_VERSION: 2026.21.44 |
| 16 | + |
| 17 | +concurrency: |
| 18 | + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
| 19 | + cancel-in-progress: true |
| 20 | + |
| 21 | +jobs: |
| 22 | + buildifier: |
| 23 | + runs-on: ubuntu-latest |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@v6 |
| 26 | + - uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0 |
| 27 | + with: |
| 28 | + bazelisk-cache: true |
| 29 | + disk-cache: ${{ github.workflow }}-buildifier |
| 30 | + repository-cache: true |
| 31 | + external-cache: true |
| 32 | + - name: Buildifier |
| 33 | + run: | |
| 34 | + curl -fsSL https://install.aspect.build | bash -s -- "$INSTALL_ASPECT_LAUNCHER_VERSION" |
| 35 | + aspect buildifier --task-key=buildifier |
| 36 | + gazelle: |
| 37 | + runs-on: ubuntu-latest |
| 38 | + steps: |
| 39 | + - uses: actions/checkout@v6 |
| 40 | + - uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0 |
| 41 | + with: |
| 42 | + bazelisk-cache: true |
| 43 | + disk-cache: ${{ github.workflow }}-gazelle |
| 44 | + repository-cache: true |
| 45 | + external-cache: true |
| 46 | + - name: Gazelle |
| 47 | + run: | |
| 48 | + curl -fsSL https://install.aspect.build | bash -s -- "$INSTALL_ASPECT_LAUNCHER_VERSION" |
| 49 | + aspect gazelle --task-key=gazelle |
| 50 | + test: |
| 51 | + name: test (${{ matrix.workspace.path }}, ${{ matrix.bazel.id }}) |
| 52 | + runs-on: ubuntu-latest |
| 53 | + strategy: |
| 54 | + fail-fast: false |
| 55 | + matrix: |
| 56 | + workspace: |
| 57 | + - { path: ".", slug: "root" } |
| 58 | + - { path: "e2e", slug: "e2e" } |
| 59 | + - { path: "examples/uv_pip_compile", slug: "examples-uv_pip_compile" } |
| 60 | + bazel: |
| 61 | + - { id: "bazel-8", version: "8.x", flags: "--bazel-flag=--test_tag_filters=-skip-on-bazel8" } |
| 62 | + - { id: "bazel-9", version: "9.*", flags: "--bazel-flag=--test_tag_filters=-skip-on-bazel9" } |
| 63 | + exclude: |
| 64 | + - { workspace: { slug: "examples-uv_pip_compile" }, bazel: { id: "bazel-9" } } |
| 65 | + env: |
| 66 | + USE_BAZEL_VERSION: ${{ matrix.bazel.version }} |
| 67 | + steps: |
| 68 | + - uses: actions/checkout@v6 |
| 69 | + - uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0 |
| 70 | + with: |
| 71 | + bazelisk-cache: true |
| 72 | + disk-cache: ${{ github.workflow }}-test-${{ matrix.workspace.slug }}-${{ matrix.bazel.id }} |
| 73 | + repository-cache: true |
| 74 | + external-cache: true |
| 75 | + - name: Test |
| 76 | + working-directory: ${{ matrix.workspace.path }} |
| 77 | + run: | |
| 78 | + curl -fsSL https://install.aspect.build | bash -s -- "$INSTALL_ASPECT_LAUNCHER_VERSION" |
| 79 | + aspect test --task-key=test-${{ matrix.workspace.slug }}-${{ matrix.bazel.id }} ${{ matrix.bazel.flags }} -- //... |
0 commit comments