From 0da28c41897166d69188e1a29100bc39d2c8ac71 Mon Sep 17 00:00:00 2001 From: zirain Date: Mon, 24 Apr 2023 16:47:20 +0800 Subject: [PATCH] Enable build action for PR (#40) Signed-off-by: hejianpeng --- .github/workflows/build.yml | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2c44b7c..c34ce9f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,29 +2,30 @@ name: Build on: push: branches: - - '*' + - "*" + pull_request: + branches: + - "*" jobs: - build: name: Build runs-on: ubuntu-latest steps: + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.18 + id: go - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version: 1.18 - id: go - - - name: Check out code into the Go module directory - uses: actions/checkout@v3 + - name: Check out code into the Go module directory + uses: actions/checkout@v3 - - name: Get dependencies - run: | - go get -v -t -d ./... + - name: Get dependencies + run: | + go get -v -t -d ./... - - name: Run tests - run: go test -v ./... + - name: Run tests + run: go test -v ./... - - name: Build - run: go build -v . + - name: Build + run: go build -v .