Run tests on GitHub Actions

This commit is contained in:
c-bata 2020-09-18 23:48:11 +09:00
parent 667e20b2c8
commit 05200bdf83

41
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,41 @@
name: Run tests
on:
pull_request:
branches:
- master
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Set up Go 1.14
uses: actions/setup-go@v2
with:
go-version: 1.14
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@master
- name: Running go tests
env:
GO111MODULE: on
run: make test
examples:
name: Build examples
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.14
uses: actions/setup-go@v2
with:
go-version: 1.14
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@master
- name: Building go examples
env:
GO111MODULE: on
run: ./_example/build.sh