Skip to content

Commit ccde280

Browse files
committed
Add CI workflow for Go project
- Created a GitHub Actions CI workflow to automate testing on push and pull request events. - Configured the workflow to run tests using Go, including dependency installation and race condition checks. - Ensured the workflow triggers on changes to Go files, go.mod, go.sum, and the CI configuration itself.
1 parent 237c5a7 commit ccde280

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- '**/*.go'
8+
- 'go.mod'
9+
- 'go.sum'
10+
- '.github/workflows/ci.yaml'
11+
pull_request:
12+
branches: [ main ]
13+
paths:
14+
- '**/*.go'
15+
- 'go.mod'
16+
- 'go.sum'
17+
- '.github/workflows/ci.yaml'
18+
19+
jobs:
20+
test:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Setup Go
25+
uses: actions/setup-go@v5
26+
with:
27+
go-version-file: go.mod
28+
cache: true
29+
- name: Install dependencies
30+
run: |
31+
go get .
32+
- name: Run tests
33+
run: go test -race -v ./...

0 commit comments

Comments
 (0)