2020-08-24 09:51:44 -04:00
|
|
|
name: build
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-02-23 11:29:25 -05:00
|
|
|
go-version: [~1.17, ^1]
|
2020-10-13 22:45:55 -04:00
|
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
2020-08-24 09:51:44 -04:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
env:
|
|
|
|
GO111MODULE: "on"
|
|
|
|
steps:
|
|
|
|
- name: Install Go
|
2023-03-15 13:22:41 -04:00
|
|
|
uses: actions/setup-go@v4
|
2020-08-24 09:51:44 -04:00
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
|
|
|
|
- name: Checkout code
|
2022-03-02 04:13:39 -05:00
|
|
|
uses: actions/checkout@v3
|
2020-08-24 09:51:44 -04:00
|
|
|
|
|
|
|
- name: Download Go modules
|
|
|
|
run: go mod download
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: go build -v ./...
|
2020-11-03 18:55:57 -05:00
|
|
|
|
2022-06-02 22:58:10 -04:00
|
|
|
- name: Test
|
|
|
|
run: go test ./...
|
|
|
|
|
2020-11-03 18:55:57 -05:00
|
|
|
- name: Build examples
|
|
|
|
run: go build -v ./...
|
|
|
|
working-directory: ./examples
|
|
|
|
|
2023-06-09 08:17:15 -04:00
|
|
|
- name: Test examples
|
|
|
|
run: go test -v ./...
|
|
|
|
working-directory: ./examples
|
|
|
|
|
2020-11-03 18:55:57 -05:00
|
|
|
- name: Build tutorials
|
|
|
|
run: go build -v ./...
|
|
|
|
working-directory: ./tutorials
|