- Remove unused services block that caused CI failure (Gitea runner doesn't support --name/-p in options field) - Update build tag to modern //go:build syntax (Go 1.17+) The workflow already manually installs and starts NATS with JetStream, making the services block redundant. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
name: CI
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.23'
|
|
- name: Build
|
|
run: go build ./...
|
|
- name: Test
|
|
run: go test ./...
|
|
|
|
integration:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.23'
|
|
- name: Install NATS Server
|
|
run: |
|
|
# Download and install nats-server
|
|
curl -L https://github.com/nats-io/nats-server/releases/download/v2.10.24/nats-server-v2.10.24-linux-amd64.tar.gz -o nats-server.tar.gz
|
|
tar -xzf nats-server.tar.gz
|
|
sudo mv nats-server-v2.10.24-linux-amd64/nats-server /usr/local/bin/
|
|
nats-server --version
|
|
- name: Start NATS with JetStream
|
|
run: |
|
|
nats-server -js -p 4222 &
|
|
# Wait for NATS to be ready
|
|
sleep 3
|
|
# Verify NATS is running
|
|
curl -s http://localhost:8222/healthz || echo "Health check not available, but NATS may still be running"
|
|
- name: Run Integration Tests
|
|
run: go test -tags=integration -v ./...
|