mirror of
https://github.com/neilotoole/sq.git
synced 2024-12-20 06:31:32 +03:00
48 lines
964 B
YAML
48 lines
964 B
YAML
name: Go
|
|
on:
|
|
push:
|
|
# Sequence of patterns matched against refs/heads
|
|
branches:
|
|
# Push events on master branch
|
|
- master
|
|
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
os: [ macos-latest, ubuntu-latest, windows-latest]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- name: Set up Go 1.14
|
|
uses: actions/setup-go@v1
|
|
with:
|
|
go-version: 1.14
|
|
id: go
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v2
|
|
|
|
- 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-
|
|
|
|
- name: Get dependencies
|
|
run: |
|
|
go get -v -t -d ./...
|
|
|
|
- name: Build
|
|
run: go build -v .
|
|
|
|
- name: Test
|
|
run: go test -short -v ./...
|