Skip to content

Commit 190ca7b

Browse files
committed
add: added CI/CD
Signed-off-by: upsaurav12 <sauravup041103@gmail.com>
1 parent d7e8beb commit 190ca7b

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Go
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Go
17+
uses: actions/setup-go@v5
18+
with:
19+
go-version: '1.22' # Adjust to match your go.mod
20+
21+
- name: Install dependencies
22+
run: go mod tidy
23+
24+
- name: Run tests
25+
run: go test -v ./...
26+
27+
- name: Check formatting
28+
run: |
29+
test -z "$(gofmt -l .)" || (gofmt -d . && exit 1)

0 commit comments

Comments
 (0)