Skip to content

Commit 0be76bb

Browse files
committed
ci: add cross-platform validation for Linux, macOs, and Windows
1 parent b57af7c commit 0be76bb

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Cross-Platform Validation
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test-and-build:
11+
name: Test on ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
timeout-minutes: 10
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os: [ubuntu-latest, macos-latest, windows-latest]
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up Go
23+
uses: actions/setup-go@v5
24+
with:
25+
go-version: '1.22'
26+
cache-dependency-path: src/server/api/go/go.sum
27+
28+
- name: Install Dependencies
29+
working-directory: src/server/api/go
30+
run: go mod download
31+
32+
- name: Build Binary
33+
working-directory: src/server/api/go
34+
run: go build -v -o acontext ./cmd/server/main.go
35+
36+
- name: Run Tests (with Race Detector)
37+
working-directory: src/server/api/go
38+
run: go test -v -race ./...

0 commit comments

Comments
 (0)