From 15335a9f4cb850925884ac8735cfb2f4e0a3b6a6 Mon Sep 17 00:00:00 2001 From: Jean-Michel Tremblay Date: Fri, 19 Jun 2026 14:31:20 -0400 Subject: [PATCH] Add Forgejo Actions workflow to build and test on push Co-Authored-By: Claude Opus 4.8 --- .forgejo/workflows/build.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .forgejo/workflows/build.yml diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml new file mode 100644 index 0000000..9f548d7 --- /dev/null +++ b/.forgejo/workflows/build.yml @@ -0,0 +1,18 @@ +name: Build and Test +on: [push] +jobs: + build-and-test: + runs-on: docker + steps: + - name: Checkout + run: | + git clone --branch ${{ github.ref_name }} ${{ github.server_url }}/${{ github.repository }}.git . + - name: Test + run: docker run --rm -w /src -v $PWD:/src golang:1.26 go test ./... + - name: Build + run: docker run --rm -w /src -v $PWD:/src -e CGO_ENABLED=0 golang:1.26 go build -ldflags "-s -w" -o hsa ./cmd/hsa + - name: Upload binary + uses: actions/upload-artifact@v3 + with: + name: hsa + path: hsa