Skip to content

Add comprehensive academic reframing documentation #291

Add comprehensive academic reframing documentation

Add comprehensive academic reframing documentation #291

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24.0'
cache: true
- name: Download dependencies
run: |
cd shared/pkg
go mod download
- name: Run tests with race detector
run: |
cd shared/pkg
go test -v -race -coverprofile=coverage.out ./models ./scheduler ./store
- name: Generate coverage report
run: |
cd shared/pkg
go tool cover -func=coverage.out | tail -1
- name: Upload coverage to artifacts
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: shared/pkg/coverage.out
build-master:
name: Build Master
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24.0'
cache: true
- name: Build master binary
run: |
go build -v -o bin/master ./master/cmd/master
- name: Verify binary
run: |
./bin/master --version || echo "Master binary built successfully"
ls -lh bin/master
- name: Upload master binary
uses: actions/upload-artifact@v4
with:
name: master-binary
path: bin/master
build-worker:
name: Build Worker
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24.0'
cache: true
- name: Build worker binary
run: |
go build -v -o bin/worker ./worker/cmd/agent
- name: Verify binary
run: |
./bin/worker --help || echo "Worker binary built successfully"
ls -lh bin/worker
- name: Upload worker binary
uses: actions/upload-artifact@v4
with:
name: worker-binary
path: bin/worker
build-cli:
name: Build CLI
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24.0'
cache: true
- name: Build CLI binary
run: |
go build -v -o bin/ffrtmp ./cmd/ffrtmp
- name: Verify binary
run: |
./bin/ffrtmp --help
ls -lh bin/ffrtmp
- name: Upload CLI binary
uses: actions/upload-artifact@v4
with:
name: ffrtmp-cli
path: bin/ffrtmp
docker-compose-test:
name: Docker Compose Integration Test
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create required directories
run: |
mkdir -p test_results
mkdir -p streams
- name: Build and start services
run: docker compose up -d --build
- name: Wait for services to be ready
run: |
echo "Waiting for services to be ready..."
for i in {1..30}; do
if curl -sf http://localhost:8428/health >/dev/null 2>&1; then
echo "✓ Services are ready after ${i} seconds"
break
fi
if [ $i -eq 30 ]; then
echo "✗ Services did not become ready in time"
docker compose ps
docker compose logs
exit 1
fi
sleep 1
done
- name: Check VictoriaMetrics is healthy
run: |
curl -sf http://localhost:8428/health || exit 1
echo "✓ VictoriaMetrics is healthy"
- name: Check Grafana is healthy
run: |
curl -sf http://localhost:3000/api/health || exit 1
echo "✓ Grafana is healthy"
- name: Check Alertmanager is healthy
run: |
curl -sf http://localhost:9093/-/healthy || exit 1
echo "✓ Alertmanager is healthy"
- name: Show running containers
if: always()
run: docker compose ps
- name: Show logs on failure
if: failure()
run: docker compose logs --tail=100
- name: Tear down services
if: always()
run: docker compose down -v