Introduce GitHub Actions (#34)

* Introduce GitHub Actions

* gofmt
This commit is contained in:
Yoshiyuki Mineo
2022-08-12 18:38:40 +09:00
committed by GitHub
parent 848d664cee
commit 809c515cc5
4 changed files with 28 additions and 18 deletions

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

@@ -0,0 +1,24 @@
on: [push, pull_request]
name: Test
jobs:
test:
strategy:
matrix:
go-version: [1.18.x, 1.19.x]
os: [ubuntu-latest]
runs-on: ${{matrix.os}}
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{matrix.go-version}}
- name: Checkout
uses: actions/checkout@v2
- name: gofmt
run: test -z "`gofmt -l .`"
- name: golint
run: test -z "`golint ./...`"
- name: go test
run: go test -v ./...
- name: Build example
run: cd example && ./linux64_build.sh