Files
go-serial/.github/workflows/test.yaml
2019-12-03 16:39:18 +01:00

37 lines
778 B
YAML

name: test
on:
push:
branches:
- master
pull_request:
jobs:
native-os-build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v1
with:
go-version: "1.13"
- name: Build native
run: GOARCH=amd64 go build -v ./...
shell: bash
- name: Run unit tests
run: go test -v ./...
shell: bash
- name: Cross-build for 386
if: matrix.os != 'macOS-latest'
run: GOARCH=386 go build -v ./...
shell: bash
- name: Cross-build for arm
if: matrix.os != 'macOS-latest'
run: GOARCH=arm go build -v ./...
shell: bash