Skip to content

Commit b4b95b6

Browse files
Create ci.yml
1 parent 473cdb3 commit b4b95b6

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
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: Download dependencies
24+
run: go mod download
25+
26+
- name: Build
27+
run: go build -v ./...
28+
29+
- name: Test
30+
run: go test -v -race -coverprofile=coverage.out ./...
31+
32+
- name: Upload coverage
33+
if: matrix.go-version == '1.24'
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: coverage
37+
path: coverage.out
38+
39+
lint:
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v4
43+
44+
- name: Set up Go
45+
uses: actions/setup-go@v5
46+
with:
47+
go-version: '1.24'
48+
49+
- name: Run go vet
50+
run: go vet ./...
51+

0 commit comments

Comments
 (0)