mirror of
https://github.com/jkstack/libagent.git
synced 2025-12-24 12:11:57 +08:00
43 lines
843 B
YAML
43 lines
843 B
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- ubuntu-20.04
|
|
- ubuntu-22.04
|
|
- windows-2019
|
|
- windows-2022
|
|
- macos-11
|
|
- macos-12
|
|
go:
|
|
- '1.20'
|
|
- '1.21'
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: ${{ matrix.go }}
|
|
|
|
- name: Lint
|
|
run: |
|
|
go install golang.org/x/lint/golint@latest
|
|
golint -set_exit_status ./...
|
|
go install github.com/gordonklaus/ineffassign@latest
|
|
ineffassign ./...
|
|
|
|
- name: Test
|
|
run: go test -v ./...
|
|
|
|
- name: Build
|
|
run: go build ./... |