Skip to content

Commit 2629e4a

Browse files
authored
chore: add action workflow for test (#23)
增加github action用于单元测试
1 parent 5d6d8b2 commit 2629e4a

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/ci.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CI on push&pr
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Setup Go
18+
uses: actions/setup-go@v5
19+
with:
20+
cache: false #消除未找到go.sum缓存文件的警告
21+
go-version: '1.21.0'
22+
- name: Install dependencies
23+
run: go get .
24+
- name: Build
25+
run: go build -v ./...
26+
- name: Test with the Go CLI
27+
run: go test

0 commit comments

Comments
 (0)