mirror of
https://github.com/neilotoole/sq.git
synced 2024-12-01 11:27:15 +03:00
52 lines
985 B
YAML
52 lines
985 B
YAML
name: Go
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- 'README.md'
|
|
- 'sq.json'
|
|
branches:
|
|
- master
|
|
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'README.md'
|
|
- 'sq.json'
|
|
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 ./...
|