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