From aa5b32aa8a69eb5e92547659e7433150f99a90b9 Mon Sep 17 00:00:00 2001 From: Omindu Rathnaweera Date: Tue, 8 Apr 2025 21:40:08 +0530 Subject: [PATCH] Create pr-builder.yml --- .github/workflows/pr-builder.yml | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/pr-builder.yml diff --git a/.github/workflows/pr-builder.yml b/.github/workflows/pr-builder.yml new file mode 100644 index 0000000..d130d39 --- /dev/null +++ b/.github/workflows/pr-builder.yml @@ -0,0 +1,41 @@ +name: CI + +on: + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: '1.16' + + - name: Cache Go modules + uses: actions/cache@v2 + with: + path: | + ~/go/pkg/mod + ~/.cache/go-build + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Install dependencies + run: go mod tidy + + - name: Build + run: go build -v ./... + + - name: Run tests + run: go test -v ./... + + - name: Build status + run: echo "Build succeeded!"