diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..6cf26a90 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,32 @@ +# This workflow builds the binary and run tests + +name: Build + +on: + pull_request: + branches: + - "**" + push: + branches: + - "main" + - "v[0-9]**" + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - + name: Checkout repository + uses: actions/checkout@v4 + - + name: 🐿 Setup Golang + uses: actions/setup-go@v4 + with: + go-version-file: go.mod + - + name: Build + run: go build -v ./... + - + name: Test + run: go test -v ./... diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml deleted file mode 100644 index 4927f098..00000000 --- a/.github/workflows/go.yml +++ /dev/null @@ -1,28 +0,0 @@ -# This workflow will build a golang project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go - -name: Go - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: '1.21' - - - name: Build - run: go build -v ./... - - - name: Test - run: go test -v ./...