https://github.com/pxyup/go_monorepo
Example of Golang-monorepo with Bazel
https://github.com/pxyup/go_monorepo
bazel bazel-examples bazel-rules golang monorepo
Last synced: 7 months ago
JSON representation
Example of Golang-monorepo with Bazel
- Host: GitHub
- URL: https://github.com/pxyup/go_monorepo
- Owner: PxyUp
- License: mit
- Created: 2019-10-09T18:26:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-09T20:36:49.000Z (over 3 years ago)
- Last Synced: 2025-04-03T15:52:29.156Z (about 1 year ago)
- Topics: bazel, bazel-examples, bazel-rules, golang, monorepo
- Language: Python
- Homepage: https://medium.com/@tduble94/create-go-monorepo-with-go-modules-and-bazel-95f00cf571d3
- Size: 15.6 KB
- Stars: 19
- Watchers: 2
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Go-monorepo with Bazel
Hello every this is real-life example of monorepository with Bazel and go-modules
# Setup
1) Install Bazel - https://docs.bazel.build/versions/master/install.html
2) Install Go Modules
```shell script
go mod download
```
# Build
All applications inside packages folder:
1) Main App
2) Second app
## Main App
Build:
```shell script
bazel build //packages/main_app:main_app
```
Bin will be here:
` bazel-bin/packages/main_app/darwin_amd64_stripped/main_app`
Test:
```shell script
bazel test //packages/main_app/...:all
```
## Second App
Build:
```shell script
bazel build //packages/second_app:second_app
```
Bin will be here:
`bazel-bin/packages/second_app/darwin_amd64_stripped/second_app`
Test:
```shell script
bazel test //packages/second_app/...:all
```
# All application
Test:
```shell script
bazel test //packages/...:all
```