Skip to content

Commit 76b6e68

Browse files
committed
Add GitHub CI workflow for automated testing
Set up continuous integration using GitHub Actions to verify builds and functionality on every push and pull request. The workflow: - Builds all targets using Bazel - Runs all 6 built-in examples (simple, math, list, guava, filter, map) - Uses bazel-contrib/setup-bazel for efficient caching - Runs on ubuntu-latest with Bazel 8.4.2 (via .bazelversion) This ensures code quality and catches regressions automatically. --- Prompt: ``` setup a github ci workflow to test that things work ```
1 parent bc5f668 commit 76b6e68

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Bazel
18+
uses: bazel-contrib/setup-bazel@0.9.0
19+
with:
20+
bazelisk-cache: true
21+
disk-cache: ${{ github.workflow }}
22+
repository-cache: true
23+
24+
- name: Build all targets
25+
run: bazel build //...
26+
27+
- name: Run example - simple
28+
run: bazel run //:cli -- example simple
29+
30+
- name: Run example - math
31+
run: bazel run //:cli -- example math
32+
33+
- name: Run example - list
34+
run: bazel run //:cli -- example list
35+
36+
- name: Run example - guava
37+
run: bazel run //:cli -- example guava
38+
39+
- name: Run example - filter
40+
run: bazel run //:cli -- example filter
41+
42+
- name: Run example - map
43+
run: bazel run //:cli -- example map

0 commit comments

Comments
 (0)