2020-02-02 04:11:34 +00:00
|
|
|
name: CI
|
2020-02-02 03:59:24 +00:00
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-09-11 10:58:33 +00:00
|
|
|
goVer: [1.20]
|
2020-02-02 03:59:24 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Set up Go ${{ matrix.goVer }}
|
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.goVer }}
|
|
|
|
id: go
|
|
|
|
|
|
|
|
- name: Check out code into the Go module directory
|
2023-09-11 10:58:33 +00:00
|
|
|
uses: actions/checkout@v3
|
2020-02-02 03:59:24 +00:00
|
|
|
|
|
|
|
- name: Get dependencies
|
|
|
|
run: |
|
|
|
|
go get -v -t -d ./...
|
|
|
|
go get gopkg.in/check.v1
|
2023-09-11 10:58:33 +00:00
|
|
|
|
2020-02-02 03:59:24 +00:00
|
|
|
- name: Build
|
|
|
|
run: go build -v .
|
2023-09-11 10:58:33 +00:00
|
|
|
|
2020-02-02 03:59:24 +00:00
|
|
|
- name: Format
|
|
|
|
run: diff -u <(echo -n) <(gofmt -d .)
|
|
|
|
|
|
|
|
- name: Test
|
2023-09-11 10:58:33 +00:00
|
|
|
run: go test -v ./...
|