Skip to content

Commit 3baf301

Browse files
committed
ci: add GitHub Actions workflow for testing and building
1 parent 27b7cc4 commit 3baf301

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
jobs:
10+
test:
11+
name: Run Tests
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Go
18+
uses: actions/setup-go@v5
19+
with:
20+
go-version: '1.25'
21+
cache: true
22+
23+
- name: Install dependencies
24+
run: go mod tidy
25+
26+
- name: Run tests
27+
run: go test -v ./internal/policy/...
28+
29+
build:
30+
name: Build Check
31+
runs-on: ubuntu-latest
32+
needs: test
33+
steps:
34+
- name: Checkout code
35+
uses: actions/checkout@v4
36+
37+
- name: Set up Go
38+
uses: actions/setup-go@v5
39+
with:
40+
go-version: '1.25'
41+
cache: true
42+
43+
- name: Build CLI
44+
run: go build -v -o sandforge ./cmd/sandforge

0 commit comments

Comments
 (0)