2021-02-19 15:26:21 +03:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
lint:
|
|
|
|
name: Golang-CI Lint
|
|
|
|
timeout-minutes: 10
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-09-12 16:59:08 +03:00
|
|
|
platform: [ubuntu-latest]
|
2021-02-19 15:26:21 +03:00
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: golangci/golangci-lint-action@v2
|
|
|
|
with:
|
|
|
|
# must be specified without patch version
|
2022-06-02 17:45:31 +03:00
|
|
|
version: v1.46
|
2021-02-19 15:26:21 +03:00
|
|
|
cross:
|
|
|
|
name: Cross
|
|
|
|
timeout-minutes: 10
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-09-02 13:45:20 +03:00
|
|
|
go-version: [1.17.x]
|
2021-02-19 15:26:21 +03:00
|
|
|
platform: [ubuntu-latest]
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
steps:
|
|
|
|
- name: Install Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Cross
|
|
|
|
working-directory: ci
|
|
|
|
run: go run mage.go -v -w ../ crossBuild
|
|
|
|
|
|
|
|
test:
|
|
|
|
name: Unit test
|
|
|
|
timeout-minutes: 10
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-09-12 08:49:26 +03:00
|
|
|
go-version: [1.17.x]
|
2021-02-19 15:26:21 +03:00
|
|
|
platform: [ubuntu-latest, windows-latest]
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
steps:
|
|
|
|
- name: Install Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Test
|
|
|
|
run: go test -race -v ./...
|