Skip to content

Commit 6cfb6a1

Browse files
committed
Add test workflows (#3)
1 parent 9cb44fc commit 6cfb6a1

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/sanity_test.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Sanity Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
- 'v*.*.*'
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-24.04
13+
steps:
14+
- name: Setup Ubuntu Native Libs
15+
run: |
16+
sudo apt update
17+
sudo apt install libglib2.0-dev
18+
19+
- name: Setup Bazel
20+
uses: bazel-contrib/[email protected]
21+
with:
22+
bazelisk-cache: true
23+
disk-cache: ${{ github.workflow }}
24+
25+
- name: Checkout Test Case Repo
26+
uses: actions/checkout@v4
27+
with:
28+
repository: Lmh-java/bazel_pkg_config_test
29+
30+
- name: Update Commit Hash in Test Cases
31+
run: |
32+
chmod +x ./update_commit_hash.sh
33+
./update_commit_hash.sh ${{ github.sha }}
34+
35+
- name: Run WORKSPACE Test Case
36+
working-directory: ./workspace_test
37+
run: |
38+
bazel run //:main
39+
40+
- name: Run BzlMod Test Case
41+
working-directory: ./bzlmod_test
42+
run: |
43+
bazel run //:main

0 commit comments

Comments
 (0)