From 46ad9fa5717d09f9564f0ad7c97a154d09da5dff Mon Sep 17 00:00:00 2001 From: Xiaofeng Wang Date: Tue, 7 Apr 2026 09:52:21 +0800 Subject: [PATCH] ci: Add GitHub Actions workflow for unit and integration tests Assisted-by: Claude Code (Opus 4.6) Signed-off-by: Xiaofeng Wang --- .github/workflows/ci.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..3d3e914 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,40 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + unit-tests: + name: Unit Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: stable + - name: Build + run: go build ./... + - name: Vet + run: go vet ./... + - name: Unit tests + run: go test -v -race ./... + + integration-tests: + name: Integration Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: stable + - uses: dtolnay/rust-toolchain@stable + - name: Build Rust test server + run: cargo build --manifest-path tests-integration/Cargo.toml + - name: Run integration tests + run: go test -v ./tests-integration/...