2020-03-03 13:19:04 +03:00
|
|
|
name: Go
|
2020-08-09 17:40:46 +03:00
|
|
|
on:
|
|
|
|
push:
|
2021-01-02 04:28:58 +03:00
|
|
|
paths-ignore:
|
|
|
|
- 'README.md'
|
|
|
|
- 'sq.json'
|
2020-08-09 17:40:46 +03:00
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
pull_request:
|
2021-01-02 04:28:58 +03:00
|
|
|
paths-ignore:
|
|
|
|
- 'README.md'
|
|
|
|
- 'sq.json'
|
2020-08-09 17:40:46 +03:00
|
|
|
branches:
|
|
|
|
- master
|
2020-03-03 13:19:04 +03:00
|
|
|
|
2020-08-06 20:58:47 +03:00
|
|
|
jobs:
|
2020-03-03 13:19:04 +03:00
|
|
|
build:
|
2020-08-06 20:58:47 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ macos-latest, ubuntu-latest, windows-latest]
|
|
|
|
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
2020-03-03 13:19:04 +03:00
|
|
|
steps:
|
2022-08-08 22:14:42 +03:00
|
|
|
- name: Set up Go 1.19
|
2020-08-06 20:58:47 +03:00
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
2022-08-08 22:14:42 +03:00
|
|
|
go-version: 1.19
|
2020-08-06 20:58:47 +03:00
|
|
|
id: go
|
|
|
|
|
|
|
|
- name: Check out code into the Go module directory
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2020-08-09 00:23:30 +03:00
|
|
|
- name: Cache Go dependencies
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/go/pkg/mod
|
|
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-go-
|
|
|
|
|
2020-08-06 20:58:47 +03:00
|
|
|
- name: Get dependencies
|
|
|
|
run: |
|
|
|
|
go get -v -t -d ./...
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: go build -v .
|
|
|
|
|
2020-08-08 08:10:41 +03:00
|
|
|
- name: Test
|
2020-08-09 00:23:30 +03:00
|
|
|
run: go test -short -v ./...
|