Skip to content

Commit 1c94739

Browse files
yaml
1 parent ddc93eb commit 1c94739

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/unit-test.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow will build a golang project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
3+
4+
name: Run Unit Tests
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
jobs:
13+
test-1-25-4:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Set up Go
19+
uses: actions/setup-go@v4
20+
with:
21+
go-version: '1.25.4'
22+
23+
- name: Build
24+
run: go build
25+
26+
- name: Run all tests with coverage
27+
run: go test -coverprofile coverage.out -v ./...
28+
29+
- name: Report test coverage to DeepSource
30+
uses: deepsourcelabs/test-coverage-action@master
31+
with:
32+
key: golang
33+
coverage-file: coverage.out
34+
dsn: ${{ secrets.DEEPSOURCE_DSN }}

0 commit comments

Comments
 (0)