Skip to content

Commit

Permalink
Update go.yml
Browse files Browse the repository at this point in the history
Improve build / test pipeline to run on Linux and Darwin
  • Loading branch information
fako1024 authored May 23, 2022
1 parent 9c2e0ea commit 28165fe
Showing 1 changed file with 24 additions and 13 deletions.
37 changes: 24 additions & 13 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ./...

0 comments on commit 28165fe

Please sign in to comment.