From 28165feaf36237f9b02446c8914c3805aea09256 Mon Sep 17 00:00:00 2001 From: fako1024 Date: Mon, 23 May 2022 16:36:51 +0200 Subject: [PATCH] Update go.yml Improve build / test pipeline to run on Linux and Darwin --- .github/workflows/go.yml | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 277d647..50a370a 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -6,29 +6,40 @@ on: jobs: - build: - name: Build + build-linux: + name: Build on Linux runs-on: ubuntu-latest steps: - - - name: Set up Go 1.x + - name: Set up Go uses: actions/setup-go@v2 with: - go-version: ^1.13 + go-version: ^1.17 + id: go - name: Check out code into the Go module directory uses: actions/checkout@v2 - - name: Get dependencies - run: | - go get -v -t -d ./... - if [ -f Gopkg.toml ]; then - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh - dep ensure - fi + - name: Build + run: go build -v -x ./... + + - name: Test + run: go test -v ./... + + build-macos: + name: Build on Darwin + runs-on: macos-latest + steps: + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ^1.17 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 - name: Build - run: go build -v ./... + run: go build -v -x ./... - name: Test run: go test -v ./...