Skip to content

Commit 1d59d62

Browse files
committed
Add ci tests
1 parent b1095b1 commit 1d59d62

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
go-version: ["1.22", "1.23", "1.24"]
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Set up Go
19+
uses: actions/setup-go@v5
20+
with:
21+
go-version: ${{ matrix.go-version }}
22+
23+
- name: Run tests
24+
run: go test -race -coverprofile=coverage.txt ./...
25+
26+
- name: Upload coverage
27+
if: matrix.go-version == '1.24'
28+
uses: codecov/codecov-action@v4
29+
with:
30+
files: coverage.txt
31+
env:
32+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)