Skip to content

Commit 538f16b

Browse files
committed
adding files
1 parent 3fef999 commit 538f16b

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

.github/workflows/ci.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
test:
11+
name: Test
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
go-version: ['1.23', '1.24', '1.25']
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@v5
22+
with:
23+
go-version: ${{ matrix.go-version }}
24+
25+
- name: Get dependencies
26+
run: go mod download
27+
28+
- name: Run tests
29+
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
30+
31+
- name: Run benchmarks
32+
run: go test -bench=. -benchmem -run=^$ ./...
33+
34+
- name: Upload coverage
35+
if: matrix.go-version == '1.25'
36+
uses: codecov/codecov-action@v4
37+
with:
38+
file: ./coverage.txt
39+
fail_ci_if_error: false
40+
41+
lint:
42+
name: Lint
43+
runs-on: ubuntu-latest
44+
45+
steps:
46+
- uses: actions/checkout@v4
47+
48+
- name: Set up Go
49+
uses: actions/setup-go@v5
50+
with:
51+
go-version: '1.25'
52+
53+
- name: golangci-lint
54+
uses: golangci/golangci-lint-action@v6
55+
with:
56+
version: latest
57+
args: --timeout=5m
58+
59+
build:
60+
name: Build
61+
runs-on: ${{ matrix.os }}
62+
strategy:
63+
matrix:
64+
os: [ubuntu-latest, macos-latest, windows-latest]
65+
go-version: ['1.25']
66+
67+
steps:
68+
- uses: actions/checkout@v4
69+
70+
- name: Set up Go
71+
uses: actions/setup-go@v5
72+
with:
73+
go-version: ${{ matrix.go-version }}
74+
75+
- name: Build
76+
run: go build -v ./...
77+
78+
- name: Vet
79+
run: go vet ./...

0 commit comments

Comments
 (0)