From 9923878c5c8b68df7f132efd28f76ce5478a1f1a Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Mon, 17 Mar 2025 19:33:07 -0400 Subject: initial import from /x/ monorepo Signed-off-by: Xe Iaso --- .github/workflows/go.yml | 62 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/go.yml (limited to '.github') diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..63f4ea8 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,62 @@ +name: Go + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + actions: write + +jobs: + build: + runs-on: alrest-techarohq + steps: + - uses: actions/checkout@v4 + + - name: build essential + run: | + sudo apt-get update + sudo apt-get install -y build-essential + + - name: Set up Homebrew + uses: Homebrew/actions/setup-homebrew@master + + - name: Setup Homebrew cellar cache + uses: actions/cache@v4 + with: + path: | + /home/linuxbrew/.linuxbrew/Cellar + /home/linuxbrew/.linuxbrew/bin + /home/linuxbrew/.linuxbrew/etc + /home/linuxbrew/.linuxbrew/include + /home/linuxbrew/.linuxbrew/lib + /home/linuxbrew/.linuxbrew/opt + /home/linuxbrew/.linuxbrew/sbin + /home/linuxbrew/.linuxbrew/share + /home/linuxbrew/.linuxbrew/var + key: ${{ runner.os }}-go-homebrew-cellar-${{ hashFiles('go.sum') }} + restore-keys: | + ${{ runner.os }}-go-homebrew-cellar- + + - name: Install Brew dependencies + run: | + brew bundle + + - name: Setup Golang caches + uses: actions/cache@v4 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-golang- + + - name: Build + run: go build ./... + + - name: Test + run: go test ./... -- cgit v1.2.3