PxyUp / go_monorepo

Example of Golang-monorepo with Bazel

Home Page:https://medium.com/@tduble94/create-go-monorepo-with-go-modules-and-bazel-95f00cf571d3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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
go mod download

Build

All applications inside packages folder:

  1. Main App
  2. Second app

Main App

Build:

bazel build //packages/main_app:main_app

Bin will be here:

bazel-bin/packages/main_app/darwin_amd64_stripped/main_app

Test:

bazel test //packages/main_app/...:all

Second App

Build:

bazel build //packages/second_app:second_app

Bin will be here:

bazel-bin/packages/second_app/darwin_amd64_stripped/second_app

Test:

bazel test //packages/second_app/...:all

All application

Test:

bazel test //packages/...:all

About

Example of Golang-monorepo with Bazel

https://medium.com/@tduble94/create-go-monorepo-with-go-modules-and-bazel-95f00cf571d3

License:MIT License


Languages

Language:Python 83.2%Language:Go 16.8%