Skip to content

Commit f678a25

Browse files
committed
cicd: add format checks
1 parent 2d44c8a commit f678a25

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/format.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2025 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
13+
name: Formatting checks
14+
on:
15+
pull_request:
16+
types: [opened, reopened, synchronize]
17+
merge_group:
18+
types: [checks_requested]
19+
jobs:
20+
formatting-check:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4.2.2
25+
- name: Cache Bazel
26+
uses: actions/cache@v4
27+
with:
28+
path: ~/.cache/bazel
29+
key: ${{ runner.os }}-format-${{ hashFiles('**/*.bazel', '**/BUILD', '**/*.bzl') }}
30+
- name: Setup Bazel with cache
31+
uses: bazel-contrib/setup-bazel@0.15.0
32+
with:
33+
disk-cache: true
34+
repository-cache: true
35+
bazelisk-cache: true
36+
- name: Run formatting checks
37+
run: |
38+
bazel test //:format.check

0 commit comments

Comments
 (0)