From 1c092d9001cd2bbee7700fa270d7021e698663e6 Mon Sep 17 00:00:00 2001 From: Eduard Tudenhoefner Date: Mon, 12 Aug 2024 12:42:52 +0200 Subject: [PATCH] Separate test groups for Spark Master tests --- .../spark_master_connect_client_test.yaml | 50 +++++++++++++++++++ .../spark_master_connect_server_test.yaml | 50 +++++++++++++++++++ .github/workflows/spark_master_test.yaml | 2 - 3 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/spark_master_connect_client_test.yaml create mode 100644 .github/workflows/spark_master_connect_server_test.yaml diff --git a/.github/workflows/spark_master_connect_client_test.yaml b/.github/workflows/spark_master_connect_client_test.yaml new file mode 100644 index 0000000000..d4d0744adf --- /dev/null +++ b/.github/workflows/spark_master_connect_client_test.yaml @@ -0,0 +1,50 @@ +name: "Delta Spark Master Tests" +on: [push, pull_request] +jobs: + test: + runs-on: ubuntu-20.04 + strategy: + matrix: + # These Scala versions must match those in the build.sbt + scala: [2.13.13] + env: + SCALA_VERSION: ${{ matrix.scala }} + steps: + - uses: actions/checkout@v3 + - uses: technote-space/get-diff-action@v4 + id: git-diff + with: + PATTERNS: | + ** + .github/workflows/** + !kernel/** + !connectors/** + - name: install java + uses: actions/setup-java@v3 + with: + distribution: "zulu" + java-version: "17" + - name: Cache Scala, SBT + uses: actions/cache@v3 + with: + path: | + ~/.sbt + ~/.ivy2 + ~/.cache/coursier + !~/.cache/coursier/v1/https/repository.apache.org/content/groups/snapshots + # Change the key if dependencies are changed. For each key, GitHub Actions will cache the + # the above directories when we use the key for the first time. After that, each run will + # just use the cache. The cache is immutable so we need to use a new key when trying to + # cache new stuff. + key: delta-sbt-cache-spark-master-scala${{ matrix.scala }} + - name: Install Job dependencies + run: | + sudo apt-get update + sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl git + sudo apt install libedit-dev + if: steps.git-diff.outputs.diff + - name: Run Spark Master tests + # when changing TEST_PARALLELISM_COUNT make sure to also change it in spark_test.yaml + run: | + TEST_PARALLELISM_COUNT=2 build/sbt -DsparkVersion=master "++ ${{ matrix.scala }}" clean connectServer/assembly connectClient/test + if: steps.git-diff.outputs.diff diff --git a/.github/workflows/spark_master_connect_server_test.yaml b/.github/workflows/spark_master_connect_server_test.yaml new file mode 100644 index 0000000000..c03a196096 --- /dev/null +++ b/.github/workflows/spark_master_connect_server_test.yaml @@ -0,0 +1,50 @@ +name: "Delta Spark Master ConnectServer Tests" +on: [push, pull_request] +jobs: + test: + runs-on: ubuntu-20.04 + strategy: + matrix: + # These Scala versions must match those in the build.sbt + scala: [2.13.13] + env: + SCALA_VERSION: ${{ matrix.scala }} + steps: + - uses: actions/checkout@v3 + - uses: technote-space/get-diff-action@v4 + id: git-diff + with: + PATTERNS: | + ** + .github/workflows/** + !kernel/** + !connectors/** + - name: install java + uses: actions/setup-java@v3 + with: + distribution: "zulu" + java-version: "17" + - name: Cache Scala, SBT + uses: actions/cache@v3 + with: + path: | + ~/.sbt + ~/.ivy2 + ~/.cache/coursier + !~/.cache/coursier/v1/https/repository.apache.org/content/groups/snapshots + # Change the key if dependencies are changed. For each key, GitHub Actions will cache the + # the above directories when we use the key for the first time. After that, each run will + # just use the cache. The cache is immutable so we need to use a new key when trying to + # cache new stuff. + key: delta-sbt-cache-spark-master-scala${{ matrix.scala }} + - name: Install Job dependencies + run: | + sudo apt-get update + sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl git + sudo apt install libedit-dev + if: steps.git-diff.outputs.diff + - name: Run Spark Master tests + # when changing TEST_PARALLELISM_COUNT make sure to also change it in spark_test.yaml + run: | + TEST_PARALLELISM_COUNT=2 build/sbt -DsparkVersion=master "++ ${{ matrix.scala }}" clean connectServer/test + if: steps.git-diff.outputs.diff diff --git a/.github/workflows/spark_master_test.yaml b/.github/workflows/spark_master_test.yaml index dfd6a5bf85..bf33f04df1 100644 --- a/.github/workflows/spark_master_test.yaml +++ b/.github/workflows/spark_master_test.yaml @@ -47,6 +47,4 @@ jobs: # when changing TEST_PARALLELISM_COUNT make sure to also change it in spark_test.yaml run: | TEST_PARALLELISM_COUNT=2 build/sbt -DsparkVersion=master "++ ${{ matrix.scala }}" clean spark/test - TEST_PARALLELISM_COUNT=2 build/sbt -DsparkVersion=master "++ ${{ matrix.scala }}" clean connectServer/test - TEST_PARALLELISM_COUNT=2 build/sbt -DsparkVersion=master "++ ${{ matrix.scala }}" clean connectServer/assembly connectClient/test if: steps.git-diff.outputs.diff