Skip to content

Commit f68f712

Browse files
committed
add workflow
1 parent 388ab30 commit f68f712

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/ci.yml

+15-1
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,25 @@ concurrency:
55
cancel-in-progress: true
66

77
on:
8+
pull_request:
9+
branches:
10+
- main
811
push:
912
tags:
1013
- "v*.*.*"
1114

1215
jobs:
16+
test:
17+
runs-on: ubuntu-latest
18+
if: github.event_name == 'pull_request'
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-go@v4
22+
with:
23+
go-version-file: ./go.mod
24+
- run: |
25+
make test
26+
1327
gh-release:
1428
runs-on: ubuntu-latest
1529
if: startsWith(github.ref, 'refs/tags/')
@@ -19,7 +33,7 @@ jobs:
1933
fetch-depth: 0
2034
- uses: actions/setup-go@v4
2135
with:
22-
go-version: stable
36+
go-version-file: ./go.mod
2337
- uses: goreleaser/goreleaser-action@v5
2438
with:
2539
args: release --clean

0 commit comments

Comments
 (0)