Skip to content

Merge branch 'main' into mvp-0.0.1-snapshot #54

Merge branch 'main' into mvp-0.0.1-snapshot

Merge branch 'main' into mvp-0.0.1-snapshot #54

Workflow file for this run

name: CI
on:
push:
branches: [ main, mvp-0.0.1-snapshot ]
pull_request:
branches: [ main, mvp-0.0.1-snapshot ]
env:
JAVA_OPTS: -Xmx4G -XX:+UseG1GC
SBT_OPTS: -Xmx4G -XX:+UseG1GC
jobs:
build-and-test:
name: Build and test
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
- name: Cache SBT and dependencies
uses: actions/cache@v4
with:
path: |
~/.ivy2/cache
~/.cache/coursier
~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt', '**/project/**/*.sbt', '**/project/**/Dependencies.scala') }}
restore-keys: |
${{ runner.os }}-sbt-
- name: Check formatting and linting
run: sbt scalafmtCheckAll scalafixAll
- name: Compile all modules
run: sbt compile Test/compile
- name: Run tests with coverage
run: |
sbt coverage test
sbt coverageReport
sbt coverageAggregate
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
file: target/scala-2.13/scoverage-report/scoverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
- name: Run compile-fail tests
run: |
echo "🔥 Running compile-fail tests - proving FlowForge's core USP..."
sbt "compile-fail-tests / test"
echo "✅ Compile-fail tests passed - contract drift prevention verified!"
- name: Spark smoke test
run: |
echo "🚀 Running Spark local smoke test..."
sbt "engines-spark/testOnly *StreamingCDCSpec"
echo "✅ Spark smoke test passed!"
- name: Flink smoke test
run: |
echo "🌊 Running Flink smoke test..."
sbt "engines-flink/testOnly *EngineAbstractionSpec"
echo "✅ Flink smoke test passed!"
- name: Test g8 template generation
run: |
echo "📋 Testing g8 template generation..."
cd /tmp
sbt new file://${{ github.workspace }}/flowforge.g8 --name="ci-test-pipeline" --organization="com.flowforge.ci"
cd ci-test-pipeline
echo "🔨 Testing generated project compilation..."
sbt compile
echo "🧪 Testing generated project tests..."
sbt test
echo "✅ G8 template test passed - turnkey experience verified!"
spark-it:
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
- name: Cache Ivy and Coursier
uses: actions/cache@v4
with:
path: |
~/.ivy2/cache
~/.cache/coursier
~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt', '**/project/**/*.sbt', '**/project/**/Dependencies.scala') }}
restore-keys: |
${{ runner.os }}-sbt-
- name: Run opt-in Spark/Delta ITs
run: |
sbt -DwithSparkIT=true "enginesSpark/testOnly *SparkDeltaSCD2IT"