This repository has been archived on 2024-10-02. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
ltc/.github/workflows/go.yml
2022-03-05 13:09:47 +08:00

40 lines
719 B
YAML

name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
#编译
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
check-latest: true
- name: Build
run: go build -v ./...
#执行测试
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up GO
uses: actions/setup-go@v2
with:
go-version: 1.17
check-latest: true
- name: Test
run: go test -run=Test
- name: Benchmark
run: go test -bench=Benchmark -benchmem