Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.22' ]
go-version: ['1.22']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
Expand All @@ -36,6 +36,10 @@ jobs:
- uses: acifani/setup-tinygo@v2
with:
tinygo-version: '0.31.2'
- name: Install build tools
run: |
sudo apt-get update
sudo apt-get install -y build-essential git curl
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
Expand Down
162 changes: 162 additions & 0 deletions .github/workflows/statestore-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
name: StateStore Test

on:
push:
branches: [ main, master, develop ]
paths:
- 'fs/statestore/**'
- 'scripts/build-rocksdb.sh'
- 'Makefile'
- '.github/workflows/statestore-test.yml'
pull_request:
branches: [ main, master, develop ]
paths:
- 'fs/statestore/**'
- 'scripts/build-rocksdb.sh'
- 'Makefile'
- '.github/workflows/statestore-test.yml'
workflow_dispatch:

jobs:
test-linux:
name: Test on Linux
runs-on: ubuntu-latest
strategy:
matrix:
test-type: [pebble, rocksdb]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'

- name: Install build tools
run: |
sudo apt-get update
sudo apt-get install -y build-essential git curl

- name: Test Pebble
if: matrix.test-type == 'pebble'
run: make test-statestore

- name: Test RocksDB
if: matrix.test-type == 'rocksdb'
run: make test-statestore-rocksdb

- name: Build with Pebble
if: matrix.test-type == 'pebble'
run: make build-lite

- name: Build with RocksDB
if: matrix.test-type == 'rocksdb'
run: make build-all

- name: Verify binary
run: |
if [ ! -f bin/function-stream ]; then
echo "❌ Binary not found!"
exit 1
fi
echo "✅ Binary created: bin/function-stream"
ls -lh bin/function-stream

- name: Upload Pebble build artifacts
if: matrix.test-type == 'pebble'
uses: actions/upload-artifact@v4
with:
name: function-stream-linux-pebble
path: bin/function-stream
if-no-files-found: error
retention-days: 7

- name: Upload RocksDB build artifacts
if: matrix.test-type == 'rocksdb'
uses: actions/upload-artifact@v4
with:
name: function-stream-linux-rocksdb
path: |
bin/function-stream
bin/function-stream/lib/rocksdb/lib/*.a
if-no-files-found: ignore
retention-days: 7

test-all-statestore:
name: Test All StateStore Implementations
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.22'

- name: Install build tools
run: |
sudo apt-get update
sudo apt-get install -y build-essential git curl

- name: Test Pebble
run: make test-statestore

- name: Test RocksDB
run: make test-statestore-rocksdb

- name: Build RocksDB variant
run: make build-all

- name: Verify build artifacts
run: |
echo "=== Build Artifacts ==="
if [ -f bin/function-stream ]; then
echo "✅ Binary: bin/function-stream"
ls -lh bin/function-stream
else
echo "❌ Binary not found!"
exit 1
fi
echo ""
echo "=== RocksDB Libraries ==="
if [ -d bin/function-stream/lib/rocksdb/lib ]; then
ls -lh bin/function-stream/lib/rocksdb/lib/*.a 2>/dev/null || echo "No library files found"
else
echo "⚠️ RocksDB library directory not found"
fi

- name: Upload all artifacts
uses: actions/upload-artifact@v4
with:
name: function-stream-linux-complete
path: |
bin/function-stream
bin/function-stream/lib/rocksdb/lib/*.a
if-no-files-found: ignore
retention-days: 7

summary:
name: Test Summary
runs-on: ubuntu-latest
needs: [test-linux, test-all-statestore]
if: always()
steps:
- name: Generate summary
run: |
echo "## 📊 StateStore Test Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Test Results by Platform" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Platform | StateStore | Status |" >> $GITHUB_STEP_SUMMARY
echo "|----------|------------|--------|" >> $GITHUB_STEP_SUMMARY
echo "| Linux | Pebble | ${{ needs.test-linux.result == 'success' && '✅ Pass' || '❌ Fail' }} |" >> $GITHUB_STEP_SUMMARY
echo "| Linux | RocksDB | ${{ needs.test-linux.result == 'success' && '✅ Pass' || '❌ Fail' }} |" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Integration Tests" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Platform | Status |" >> $GITHUB_STEP_SUMMARY
echo "|----------|--------|" >> $GITHUB_STEP_SUMMARY
echo "| All Tests (Linux) | ${{ needs.test-all-statestore.result == 'success' && '✅ Pass' || '❌ Fail' }} |" >> $GITHUB_STEP_SUMMARY

8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,17 @@ dist
bin/
.DS_Store

# CI artifacts
.github/workflows/*.log

benchmark/*.pprof

operator/vendor/

# RocksDB in bin/lib directory (build artifacts)
bin/lib/rocksdb/lib/
bin/lib/rocksdb/src/
bin/lib/rocksdb/include/rocksdb/

._*
**/.DS_Store
Loading
Loading