Skip to content

Commit

Permalink
Add build to the test
Browse files Browse the repository at this point in the history
  • Loading branch information
mlsmaycon committed Jun 14, 2021
1 parent e059059 commit 7449848
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion .github/workflows/golang-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,33 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- name: Test
run: go test ./...
run: go test ./...

test_build:
strategy:
matrix:
os: [ windows, linux, macos ]
go-version: [1.16.x]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

- name: Cache Go modules
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install modules
run: go mod tidy

- name: run build
run: GOOS=${{ matrix.go-version }} go build .

0 comments on commit 7449848

Please sign in to comment.