29 lines
513 B
YAML
29 lines
513 B
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
#编译
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup Go environment
|
|
uses: actions/setup-go@v3.0.0
|
|
with:
|
|
go-version: '>=1.18'
|
|
check-latest: true
|
|
|
|
- name: Build
|
|
run: go build -v ./...
|
|
|
|
- name: Test
|
|
run: go test -run=Test
|
|
|
|
- name: Benchmark
|
|
run: go test -bench=Benchmark -benchmem
|