Skip to content

Commit 7524da1

Browse files
committed
Feat: Add github workflow for unit-test on push to any branch
1 parent 0505243 commit 7524da1

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/unit-tests.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: unit-tests
2+
permissions:
3+
contents: read
4+
5+
on:
6+
push:
7+
8+
jobs:
9+
unit-tests:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v5
15+
16+
- name: Set up Go
17+
uses: actions/setup-go@v6
18+
with:
19+
go-version: "1.24"
20+
21+
- name: Run Unit Tests
22+
run: |
23+
go clean -testcache && go test -v ./... -coverprofile=coverage.out
24+
go tool cover -func=coverage.out
25+
go tool cover -html=coverage.out -o coverage.html

0 commit comments

Comments
 (0)