2020-08-24 09:51:44 -04:00
|
|
|
name: build
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-02-05 08:54:10 -05:00
|
|
|
go-version: [~1.18, ^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-12-07 06:59:23 -05:00
|
|
|
uses: actions/setup-go@v5
|
2020-08-24 09:51:44 -04:00
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
|
|
|
|
- name: Checkout code
|
2023-09-06 13:24:42 -04:00
|
|
|
uses: actions/checkout@v4
|
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
|