Skip to content

Commit 6e19343

Browse files
committed
Add example for Bazel Build & Test workflow
This is just an example how developers will be able to build their own code using this workflow.
1 parent 185cf85 commit 6e19343

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/build_and_test.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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+
14+
# Workflow configuration for `Bazel Build & Test`
15+
# This workflow runs Bazel build and test when triggered by specific pull request events.
16+
17+
name: Bazel Build & Test
18+
on:
19+
pull_request:
20+
types: [opened, reopened, synchronize]
21+
merge_group:
22+
types: [checks_requested]
23+
jobs:
24+
build:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/[email protected]
29+
- name: Setup Bazel
30+
uses: bazel-contrib/[email protected]
31+
# TODO: Uncomment this part once the code is ready for build
32+
# and define the target for it.
33+
# - name: Bazel build module target(s)
34+
# run: |
35+
# bazel build <targets>
36+
test:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Checkout repository
40+
uses: actions/[email protected]
41+
- name: Setup Bazel
42+
uses: bazel-contrib/[email protected]
43+
# TODO: Uncomment this part once the code is ready for test
44+
# and define the targets for it.
45+
# - name: Bazel test module target(s)
46+
# run: |
47+
# bazel test <targets>

0 commit comments

Comments
 (0)